Ignore Responses in the Next Iteration(s) if chosen in the Previous Iteration
|Summary||Article on how to ignore responses in the next iteration(s) if chosen in the previous iteration(s).|
|Written for||Script Writers ; Developers|
|Keywords||loop ; loops ; ignore ; responses ; ignore responses ; grids ; iteration ; iterations|
Example QEX (located at the bottom of this article) can be downloaded here.
If you'd like to hide certain responses in the next iteration(s) that were selected at the previous iteration(s), then here is how to achieve that . . .
Create a standard question table loop:
Create an "Ignore Response" Routing that looks like this:
Use this code in the Ignore Response Script window:
ALTERNATIVELY: you could also use "Q1.AllValues" as the Ignore Responses script.
It does the same thing as the above FORSET script, but it's more compact. See below image:
Change your loop from a "Response Block - Vertical Loop" to a "Styles - Classic Responses":
So it looks like this when done:
If everything is setup correctly, the loop should behave nicely as shown in the below gif:
When I choose "Item 1" at "Brand A", it doesn't appear at "Brand B". When I choose "Item 4" at "Brand B", it doesn't appear at "Brand C", etc. The previous iterations selected response is now hidden.