I am doing the following. I have a repeating group displaying an option set of Regions. Group inside repeating group that holds all the information has a state “selected” which is either yes or no based on whether user has clicked on the element or not.
The issue is that I am not able to reset those states from outside of the Repeating group. Hence, after using the popup once, upon opening it a second time the previously selected Regions are highlighted.
I would like to reset them when the popup is no longer visible, because I allow user to update the information and that would be the correct way to do (in my opinion).
Thanks for help!
Yeah, states in repeating groups (actually, on the items in the repeating group) are hard to reach, so there is another solution to make items in a repeating group selectable:
A) Create two states on page level, both of type region and one with _prev in the name and make sure to mark them as list:
B) Adjust the workflow you use now (to set that state selected) to do this:
- Action 1: Set state regions_prev to state regions (copy the contents of state regions_prev to regions).
- Action 2: Add the region of the current cell (the one that is clicked) to state regions, but only when state regions_prev does not already contain this region (see the condition). In other
- Action 3: Remove the region of the current cell from state regions, but only when region_prev already contains it.
C) Add a condition so that the user can identify the regions that he or she selected:
Now when the popup is closed and/or you have processed the data in the state regions you can set states regions and regions_prev to empty:
*It is a good habit to keep all of the states in one place, it makes them easier to find afterwards.
In the end it should work like this:
Hope this helps,
You can also try using the free plugin ‘Orchestra’:
This will allow you to create workflows outside of the repeating group that affect individual cells of the repeating group based on conditions or states.
Thank you! Everything works
This topic was automatically closed after 70 days. New replies are no longer allowed.