Embedded data cannot be changed if it comes from a querystring | XM Community
Skip to main content
Question

Embedded data cannot be changed if it comes from a querystring


Forum|alt.badge.img+3
  • Level 2 ●●
  • 11 replies

I import embedded data from a querystring   ?abc=9999.

I want to validate this embedded data.

If a value is wrong I wish to change it with JavaScript

Qualtrics.SurveyEngine.setEmbeddedData(‘abc’, 123);

This does not work, the value does not change.

If I leave abc out of the querystring it updates OK.

3 replies

ArunDubey
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+41
  • QPN Level 8 ●●●●●●●●
  • 589 replies
  • August 4, 2023

If you know the value is wrong then you can use survey flow branch logic and update the information in survey logic instead of using JS. Is there any specific reason to use JS?


Forum|alt.badge.img+3
  • Author
  • Level 2 ●●
  • 11 replies
  • August 7, 2023

HI, yes, I need string manipulation. I will see what survey branch logic does.  Can it change %20 to a space?  And look for certain string combinations? 


ArunDubey
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+41
  • QPN Level 8 ●●●●●●●●
  • 589 replies
  • August 7, 2023

Now I understand your requirement. Can you please try to save it in new embedded data variable instead of existing one? or you can share your JS code here.


Leave a Reply