Embedded data element formating | XM Community
Solved

Embedded data element formating

  • 11 June 2021
  • 2 replies
  • 45 views

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.

icon

Best answer by Mishraji 12 June 2021, 20:56

View original

2 replies

Userlevel 4
Badge +18

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