Syntax question - Embedded Data Math Operation in JS | XM Community
Question

Syntax question - Embedded Data Math Operation in JS

  • 6 April 2020
  • 1 reply
  • 6 views

Badge +2

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}' );


1 reply

Userlevel 7
Badge +27

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

Leave a Reply