Number Format Embedded Data Values | XM Community
Skip to main content

How can I implement the formatting of calculated values derived from my survey flow using embedded data to incorporate thousand separators? These values are initially calculated without thousand separators, and I am seeking a solution to add the necessary formatting after the calculation process within the survey flow. I suspect this may necessitate Java or HTML coding, but as I lack prior coding experience, I would greatly appreciate assistance in providing the relevant code, if feasible.

We cannot do it in survey flow since we cannot run JS there, however on a question we can use below script to update JS with required format.

const n = 716298462; //pipe in the number here
const formatted = n.toLocaleString('en-US');
console.log(formatted);
Qualtrics.SurveyEngine.setEmbeddedData("number", formatted);

 


Leave a Reply