Using embedded data in piped text code

teammieleteammiele Community Member Qubie ✭

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

Answers

  • TomGTomG Raleigh, NCCommunity Member, Product Ideas Wizard ✭✭✭✭✭

    No, you can't. Loop and merge can only be field numbers.

    You can pipe values into your loop & merge set up. So, for example, you can pipe $e{ q://QID1/SelectedChoicesRecode + 1 } into Field 1.

  • teammieleteammiele Community Member Qubie ✭

    @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? To clarify, if they choose the first item in the dropdown list, I don't want my loop and merge Field 1 to contain the number "1", but rather I want to call Field 1; if they choose the second item in the dropdown list, I don't want my loop and merge Field 1 to contain the number "2", but rather I want to call Field 2; etc. Does that make sense?

  • YASH1TYASH1T Mumbai/IndiaCommunity Member Guru ✭✭

    @teammiele

    As mentioned by @TomG piped text cant be build dynamic, you can try using JS as follow:
    add a place holder in place of piping in questin text (e.g.   )and update this placeholder through javascript (as you know which filed to pipe in from selection embedded variable, so just replace content of .ph with that field )

Sign In to Comment