Trying to use Q_PopulateResponse and branching logic together? | XM Community

Trying to use Q_PopulateResponse and branching logic together?

  • 5 April 2018
  • 8 replies

I'm using an anonymous link with 2 different query strings to post a survey on an intranet page: 1 string for Yes answers to the first question and 1 string for No answers. Question 2 uses branching logic based on the answer to question 1.

I'm using Q_PopulateResponse to gather the answer for question 1 from the anonymous link on the intranet page. When a user clicks the link, the survey opens and they see Q1 with their answer auto-populated. I've set up an auto-advance timer for the smallest increment of time (.1) and the branching logic does work properly. But Q1 does flash briefly on the screen. Ideally, I'd like the survey to open on the next question in the survey when they click the Yes or No button the intranet page.

Is there a way to not show Q1 at all with q_populateresponse? Or another workaround that isn't creating a Yes survey and a No survey?

Thanks in advance for your time!


Best answer by TomG 6 April 2018, 00:34

View original

8 replies

Userlevel 7
Badge +37
I haven't used q_populateresponse before but maybe you can test the following and see if it works.

Split Q1 off into its own block.

Survey flow:
Branch - condition that q_populate for Q1 is not yes or no
Block 1 with Q1

Branch - condition that q_populate for Q1 is yes or no
Block 2 with Q2 on

I would have tested this idea on my own but don't know how to replicate your scenario on my end, but wanted to brainstorm with you.
Userlevel 7
Badge +27
You could do away with Q1 altogether and just use an embedded data field called Q1 in its place. Then your survey links are just url&Q1=Yes or url&Q1=No. Then in your survey flow just branch off the value of embedded variable Q1.

P.S. It appears you have posted this question twice.
Userlevel 6
Badge +7
@TomG Good catch! @ldev I've deleted your other duplicate question that had no responses. 🙂
@TomG - Thanks for replying and catching my dupe posting. Nothing says *newbie* quite like a double post. 🙂

I did try the embedded data as an option, but we lost many of the visualization options for reporting. My guess is because the embedded data isn't recognized as a true answer to a question?
@bstrahin - I gave this one a try, but it couldn't make it work. Could be user error, but I couldn't find a way to set q_populateresponse as a condition in the survey flow.
Userlevel 7
Badge +27
So if you can't use an embedded data field, you could add a lot of padding to the top of Q1 to push it off the bottom of the page. That way respondents will just see a blank page when it flashes by. Just add something like this to the top of your question text in html mode:
<div style="padding-top:2000px"></div>Your question text here.
Userlevel 7
Badge +37
@ldev maybe we have different permissions. But here's a screenshot of what you should end up with. You have to choose embedded data in the drop down of your branch logic and type in the variable name for Q_PopulateResponse in your condition.

You will also want to put a branch on the block for Q1 that is the same but instead of is equal to, you would use is not equal to.

Userlevel 7
Badge +27
@bstrahin - Q_PopulateResponse is a json string. It would be formatted like `{"QID1":"1"}`. I don't think branching based on it will help @ldev since they need Q1 answered for reporting.

Leave a Reply