How to prioritize question statements off of embedded data? | XM Community
Solved

How to prioritize question statements off of embedded data?

  • 23 August 2018
  • 5 replies
  • 50 views

Badge +1
I need a way for question statements to flex based on the order I enter them into the embedded data.

We have a question that asks to rate presenters. For our events, 10 out of the 30 presenters actually presented that day. Then the next day it might be a different 10 people. to add complexity there could be 2 or more events going on at the same time. I have created embedded data to pull in the name of the presenter that someone will enter before sending out the link. Example. Presenter = BillyJohnSallyJim. Using "contains" logic the questions correlated to these people populate. However they populate in the order in which they were programmed/built. I need the questions to populate based on the order I entered them in the embedded data to align with the order they presented in to make the best customer experience.

I can't break the presenters out into individual question since I need a graph of the presenters overall sore in reporting and mapping 30+ presenters across 10 topics would be very complex. Unless there is a why to easily connect that I am not aware of.
icon

Best answer by TomG 27 August 2018, 23:20

View original

5 replies

Userlevel 7
Badge +20
There is no such out of box feature available to show the "Questions" in a specific order based on embedded data.

You can create blocks which will have the same questions, however, in the order which you want to present based on the presenter. You will have to create as many blocks as the presenter.

And in survey flow, you can add a branch logic so that "Presenter A" will see "Presenter A block".
then we will have to map the response of similar question into one embedded data and then use that embedded data in reporting to show overall rating.

I know this is a tedious task to achieve the requirement.
Userlevel 4
Badge +5
Another thought is to create a hidden question that lists all of the presenters. Add display logic with the embedded data. Then add a loop and merge to the question(s) the respondent will see all in the same block that is based to "displayed" options from the hidden question.
Badge +1
These are great ideas!

I tried both and ran across issues. The issue with map the response of similar question into one embedded data is each day there are 10 different events and the mapping would be an ongoing daily task for someone. these events are all happen at the same time and that person would be updating every hour.

The issue with Loop and merge is our embedded data shows the list of presenters. There is no question that is populated that lists the presenters. To my understanding you can't do loop and merge unless something is selected. Correct?

Thank you all for the ideas, open to trying anything! Our team has thought through many scenarios. Currently can get the presenters to show by creating one question of all presenters then based on embedded data only show the ones presenting at that event. The order is the only thing.
Userlevel 7
Badge +27
> The issue with Loop and merge is our embedded data shows the list of presenters. There is no question that is populated that lists the presenters. To my understanding you can't do loop and merge unless something is selected. Correct?
Not correct. As @Libertywick mentioned, you can loop off displayed choices.

Anyway, as to your problem...use JS to split your Presenter variable into separate variables and populate new embedded variables (this assumes that each presenter's name begins with a capital letter as you've shown it):
```
var pa = "${e://Field/Presenter}".split(/(?=[A-Z])/);
jQuery.each(pa, function(i) { Qualtrics.SurveyEngine.setEmbeddedData("Presenter"+(i+1), this) });
```
Then pipe your new presenters (e.g, ${e://Field/Presenter1} , etc.) into an MC question and use display logic to display only those that aren't empty. You'll have to set up the MC question for the max possible number of presenters. Hide the question with JavaScript, then loop & merge based on the displayed choices in the MC question. The loop will go through the presenters in order.

Your biggest issue will be decoding the data since loop 1 won't be a specific presenter, just the one listed first for a particular respondent. You could write some code to decode the loop question responses into separate presenter specific embedded variables, but that is fairly complex.
Badge +1
Thank you! Going to spend some time testing this idea. Will reach out if I have any additional questions.

Leave a Reply