loop a block: pipe text within a loop | XM Community
Skip to main content

Hi, I am having trouble piping text in a loop & merge block.

We are asking about the respondents’ immigration history. First, we ask when they first came to the US, what their first immigrant status was, and whether their status has changed since then. If their answer to Q36 is Yes OR the answer to Q37 is No, then we will ask about their changes in immigration statuses. 

 

In the next loop and merge block, the questions should be repeated based on the last question (“Is xxxx your current status?”), and each question should pipe the text from the first question (immigration status). 

However, it doesn’t show any piped text in the loop when using ${q://QID38/ChoiceGroup/SelectedChoicesTextEntry}. Can anyone let me know the correct piped text in this case?

Hi @uniquename , 

For your Q38, i think may be trying to use previous loop Q38’s value as a piped text for Q38 but it takes the current loop Q38’s value instead. Since there was no value for current loop Q38, piped text will be empty.

 

I don’t really know JS but perhaps there is a way to set an embedded data at both Q37 and Q41 with the same variable name to take in Q38’s value?

Then, the Q38’s piped text can then be referring to the embedded data.

 


Leave a Reply