Syntax question - Embedded Data Math Operation in JS | XM Community
Skip to main content

Hi all,
I'm trying to set some embedded data using javascript that uses a math operation. It doesn't seem to be working, I'm presuming my syntax is incorrect. Could anyone point me in the right direction?
Three variants of what I've tried are below. Many thanks!

Qualtrics.SurveyEngine.setEmbeddedData( '${e://Field/Total%20Permanent%20Staff}', '$e{q://QID75/ChoiceNumericEntryValue/1/1 + q://QID75/ChoiceNumericEntryValue/1/2 + q://QID75/ChoiceNumericEntryValue/1/3}' );

Qualtrics.SurveyEngine.setEmbeddedData( 'Total%20Permanent%20Staff', '$e{q://QID75/ChoiceNumericEntryValue/1/1 + q://QID75/ChoiceNumericEntryValue/1/2 + q://QID75/ChoiceNumericEntryValue/1/3}' );

Qualtrics.SurveyEngine.setEmbeddedData( 'Total Permanent Staff', '$e{q://QID75/ChoiceNumericEntryValue/1/1 + q://QID75/ChoiceNumericEntryValue/1/2 + q://QID75/ChoiceNumericEntryValue/1/3}' );

Add a space after $e{ and a space before }


Leave a Reply