Embedding Survey Results in Questions | XM Community
Skip to main content

I am working on a project where the faculty wants to respondents to compare their response to Q1 to the Q1 responses already submitted before proceeding to Q2. I can prototype this by adding a text/graphic question on the page following Q1, piping their Q1 response and embedding an iFrame to a tiny Report (see attached screenshot). In this example, I’m piping the Q1 values into the column width to make it more responsive.

That’s tolerable for an out-of-the-box solution, but the iframe is problematic for accessibility reasons. Also, it’s clearly a bit of a Frankenstein solution, even with pink and yellow lipstick on the pig.

I played around with Results, trying to embed a public widget for this question instead, but the embed “code” is limited to the ID for the given widget. I’m guessing the only real approach for displaying the results on a survey page has to do with exporting the survey data elsewhere, then creating hooks to import it back as ED fields.

Am I missing something?  Has anyone successfully done this?


 

 

While the public Advanced Report in an iframe does the trick, another option for using previously collected survey responses within the current respondent's survey is to use Quotas. The idea being that a Quota is set to increment each time a survey answer is selected, and these counts can be used to calculate percentages/means which can be shown to the current respondent. This post touches on that approach a bit more, but I might lean toward using Math Operations at the top of the Survey Flow instead of JavaScript for the calculations. If these percentages need to be visualized as a chart, you can use a library like Plotly or similar to do so, an example on this post.


Thanks, Tom. Using Quotas is a brilliant approach. We’ll se what we come up with and post a followup Reply.


Leave a Reply