Performing functions on embedded data from piped text | XM Community

Performing functions on embedded data from piped text

  • 9 February 2023
  • 1 reply
  • 90 views

Userlevel 2
Badge +4

Hello, apologies as I'm new to Qualtrics/coding.
I have a task in my survey which requires participants to enter a value into a box which needs to change other values in a table next to it. It seems I could do this with embedded data by generating some new embedded variables in survey flow. In particular I would like to perform some basic summing/subtracting/multiplication but also some if/else statements depending on the scores gained in the survey.
Would anyone be able to assist with the syntax as I have never coded prior to this and am not in tune with the formatting of such calculations.
Many thanks in advance
Picture1.pngHere is an example of what I'm after


1 reply

Userlevel 7
Badge +27

It sounds like this needs to be dynamic on a page (when someone enters a number, other number on the page change). If that's the case, you'll need to use JavaScript instead of embedded data fields.
If you where to use embedded data fields, you can't put assignments (=) or conditionals (>) inside arithmetic expressions. Instead of conditionals use survey flow branches.

Leave a Reply