Embedded data element formating | XM Community
Skip to main content

I built an embedded data element that is summing table matrix values and answers will be in the thousands. When I display the value in a later question, I was hoping to display "3,857" rather than "3857". Is this possible? I found reference to storing embedded data with formats on a previous post, but no details on how to do this and when I look at the option, I can set it to a number format, but that does not bring any formatting options.

MattC_CO - You can use javascript to do so. Add a blank text entry question after the matrix question and add the following javascript to it:

Qualtrics.SurveyEngine.addOnReady(function()
{
var x = parseInt("${q://QID1/SelectedChoicesRecode}");
z = x.toLocaleString('en-US');
Qualtrics.SurveyEngine.setEmbeddedData("Calc", z);
jQuery("#NextButton").click();
});

Add 'Calc' as an embedded data in your survey flow and pipe this embedded data field in the latter question(s).


Perfect, thank you! Mishraji


Leave a Reply