I need to display one (and only one) of several different question based on a value of a loop and merge field. The built in display logic facility, however, seems to only allow display logic based on which loop number one is on, not on the values of the loop and merge fields. I have tried to use javascript to save the value of the loop and merge field to embedded data, but the embedded data won't update until I go to another page.
Clearly, the necessary value of the embedded data field is available on the page (e.g., I can display it with a pipe) but I can't seem to use it to display (or not) a question.
Is there some way I can solve this?
Thanks
Page 1 / 1
Sorry, in the second paragraph I said "the value of the embedded data field is available" but meant to say "the value of the loop and merge field is available". Part of the problem is that I cant seem to take the value of the merge field and get it into an embedded data field so that I could the do display logic based on the embedded data field.
@Randy2019,
You can use JS to assign the loop & merge field value to an embedded data variable on a page in the loop prior to the page where you want to use display logic based on the field (the embedded data variable that you assigned the loop and merge field value to). If you don't have a page prior to the question, create one with a descriptive text question. Add your JS that sets the embedded variable to the descriptive text question and also have it click the Next button. Add a lot of padding to the top of the descriptive question to push it off the bottom of the screen so the respondent doesn't see it when it flashes by.
You can use JS to assign the loop & merge field value to an embedded data variable on a page in the loop prior to the page where you want to use display logic based on the field (the embedded data variable that you assigned the loop and merge field value to). If you don't have a page prior to the question, create one with a descriptive text question. Add your JS that sets the embedded variable to the descriptive text question and also have it click the Next button. Add a lot of padding to the top of the descriptive question to push it off the bottom of the screen so the respondent doesn't see it when it flashes by.
Thanks TomG. I will try that.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.