Validation with Loop and Merge | Experience Community
Skip to main content
Question

Validation with Loop and Merge

  • Jan 10, 2024 7:24 PM UTC
  • 5 replies
  • 122 views

Forum|alt.badge.img+2

I wanted to get clarification on the options in the validation window.  I previously selected “All loops” for the text entry age range but changed it to “current loop”.  When do I use “all loops”? Is “current loop” correct to use in this case (image enclosed)

 

5 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Jan 10, 2024 7:40 PM UTC

If this validation is within the loop you want to use Current Loop in all conditions. You would only use All Loops after you have completed the loop.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • Jan 10, 2024 8:37 PM UTC

@TomG Ahh, I think I got it now.  Yes, this is within the loop.  O.K. great, thank you so much!

 

When testing, how can I test with loops, is there a way? 

&Q_PopulateResponse={"QID1":"33","QID3":"1","QID4":"1","QID5":"1","QID192":[{"Value":"4","Text":"2"}],"QID197":[{"Value":"4","Text":"2"}]}

 

For this code: QID192 is stating there are 2 children (so I should expect 2 loops).  Then QID197, is the first question of the loop asking for the age of the child.  Can I test for each loop using the Q Populate Response JSON syntax?

 

Thank you so much!


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • Jan 16, 2024 4:25 PM UTC

When testing, how can I test with loops, is there a way? 

&Q_PopulateResponse={"QID1":"33","QID3":"1","QID4":"1","QID5":"1","QID192":[{"Value":"4","Text":"2"}],"QID197":[{"Value":"4","Text":"2"}]}

 

For this code: QID192 is stating there are 2 children (so I should expect 2 loops).  Then QID197, is the first question of the loop asking for the age of the child.  Can I test for each loop using the Q Populate Response JSON syntax?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Jan 16, 2024 10:18 PM UTC

@Rhaven Nelson,

You can use:

&Q_PopulateResponse={"QID1":"33","QID3":"1","QID4":"1","QID5":"1","QID192":[{"Value":"4","Text":"2"}],"1_QID197":[{"Value":"4","Text":"2"}],"2_QID197":[{"Value":"4","Text":"2"}]}

 


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • Jan 17, 2024 10:10 PM UTC

This is great! I will try this, thank you @TomG!