Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

JavaScript to Call "Div Id"

RobandCI
RobandCI New YorkCommunity Member, Qualtrics Brand Admin Qubie ✭

Thank you in advance to anyone who offers advice, assistance or a recommendation.

Issue: I've created a Seed Match / Bracket style survey (similar to a sports bracket) for users to identify the top movie that they would like to enter into an overall contest. There are 16 individual movie titles. The user selects their preferred movie in each round, which than advances to the next round.

The method that I have used to perform this within Qualitrics is piped text, since carry-forward logic only works for one-level forward. While the winning movie needs to be 'carried-forward' for 5 rounds (Conference 1, Semi-Finals, Finals, Championship > Winner Declared).

All of the selections are image-based. Each of the images has been re-coded with a Variable Name. Each answer box also includes a text value (see below screenshot)

The flow of my survey works perfectly, however, the reporting is an issue - since when I get to my Championship question - the reporting does not show the variable name of the movie, but, instead the Piped Text id.

This may be confusing so I attached a PDF overview of the flow for reference ("Piped Text Reporting Issue")....

So, when looking at a report on the selected answer in the last question (Championship)...instead of seeing the 16 different potential combinations that could have been 'piped' forward. The report table/graph is showing "${q://QID24/ChoiceGroup/SelectedChoices}" or "${q://QID25/ChoiceGroup/SelectedChoices}" as the x axis variables. Counting the number of times the "${q://QID24/ChoiceGroup/SelectedChoices}" is selected. Instead of showing that Movie 1 made it to QID24 and was selected three times, while Movie 5 was only selected once.
"

Goal: The goal is to be able to count the number of times a movie is selected when represented in the Championship question.

Solution: After speaking with Qualtrics Support and my Company Success Lead. The best suggestion made was to add a "Div ID" to each image than use JavaScript to pull the 'Div ID' into the final report and an embedded data field to translate that id????? (I dont really flow the solution).

But, I did add a 'Div Id" to each Movie image

Assistance Being Requested Would anyone be able to help me determine the JavaScript that would be required in the Championship question so that the selected movies DivId is being called and reported on, instead of the piped text variable.

Thank you again!

Best Answer