Use JavaScript in workflow to change stored data? | XM Community
Skip to main content

Hi,
Is it possible to use JavaScript in a workflow to change stored data? I am passing participants from a main survey to a gift card survey and our IRB requires that no identifying info is passed from the main survey to the gift card one. However, I want to prevent users from passing the gift card survey around to people who haven't taken the main survey. (I have RelevantID, etc. turned on -- I'd like something specific than that.)
My solution is to create a random number with embedded data and pass that to the gift card survey in the URL. That works, but Qualtrics stores the number with the first survey, too, which I can't have because of my IRB restrictions. My solution is to use a workflow to set that value to 0 after the first survey is submitted, but I can't figure out how to do it.
Is this possible? And if so, can you please provide a code snippet to show how to set an embedded variable? Thank you!

I think you need to use the API to update responses from a workflow.


Good to know -- thanks, Tom!


Leave a Reply