Can I use loop & merge? | XM Community
Skip to main content

In my Contact List, I have two columns: Department and ClassName (i.e. English, Writing 101; English, Creative Writing 101; English, British Literature, etc._. 

With the SSO Authenticator, I can capture the user’s Department. 

Can I use loop & merge to show every ClassNames in the block of questions and repeat? In other words, is there a way to populate Field 1 in the Loop & Merge dialog with ClassName from my contact list?

the questions in the block, followed by British Literature, etc. until all the rows in the Contact List for English have been exhausted

 

@hmacdermott,

There are a couple of different approaches you could take.

One approach would be to add a multiple choice question before the loop with all the possible classes, then add choice display logic to display if ClassName contains the class name. Hide the question with JavaScript.  Base the loop off the displayed choices in the hidden question. This will result in clean data (e.g., Loop 1 will always be Writing 101, Loop 2 Creative Writing 101, Loop 3 British Literature, etc.). I would opt for this one if the number of possible classes in manageable.

Another approach would be to use some JavaScript to parse the field ClassName into separate embedded data fields in a question prior to the loop (e.g., class1, class2, class3, etc.). Then pipe the embedded data fields into Field 1 of your loop & merge. You’ll need to do some additional work if the number of classes per contact is variable. The resulting data will be messy because the data represented by a loop will different by respondent (Loop could be Writing 101 for one respondent and British Literature for another respondent)

  

 

 

 


Leave a Reply