Wrestling with Workflow Code Tasks | XM Community

Wrestling with Workflow Code Tasks


Badge +1

How does one get and set embedded variables in a Workflow Code Task? Is this even possible?
The error message ReferenceError: Qualtrics is not defined made me realize this is not the same type of coding as in the regular work flow!
code-task-error.pngAny guidelines would be greatly appreciated!


4 replies

Userlevel 4
Badge +18

thampson Code Task is not not same as javascript space available at question level, so those objects and functions don't work there. You can do all those calculations in Code task and return the desired data to pipe it in next webservice task to update the embedded data there using Qualtrics API.

Badge +1

Thank you for your explanation. It's too bad the paradigms are so different. We did find a work-around.

Thanks again!

Badge +1

thampson I had this same question around how to reference embedded data variables in a Code Task! Would you be able to share what your work-around was?

Badge +2

Please if anyone can share how to use a field from survey and apply find replace for carriage return and then return that corrected value back to embedded data for it to flow correctly in the webservice. Appreciate any support.

Leave a Reply