Solved
Using embedded data in piped text code
Is it possible to use embedded data in piped text code? Specifically, I’m trying to choose which loop and merge column (not row) is used based on which response is picked in an earlier dropdown list. So, I’m trying to save the order number of their selection from the dropdown list (embedded data in Survey flow: selection = $e{ q://QID1/SelectedChoicesRecode + 1 }) and pipe that number into the loop and merge piped text code so that it selects the correct row when populating that part of my question (e.g., How often do you shop at ${lm://Field/selection}?). Is there a way to make this work?
Best answer by TomG
> @teammiele said:
> @TomG : So even if an embedded data variable (or maybe a variable in javascript) contains a number (specifically the number of the field that I would like my loop and merge code to call), there's no way to use that number in my loop and merge code to call that field?
Correct, you can't dynamically build a piped string with a JavaScript variable or a pipe within a pipe. The reason is that pipes are resolved on the survey before the page is sent to the browser, so you can't modify them in the browser. For more details see this thread:
https://www.qualtrics.com/community/discussion/2481/how-to-create-piped-text-in-javascript-and-use-its-value
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
