I utilize a Repeating group, and I want only one RG Group visible at the same time. However, for some reason when a second group is opened the other groups stay open, even though, The condition has been met to close the group
I’d love to try to help but there’s not enough information here for me to figure out what’s going on. Can you send screenshots of the RG conditions and your workflows, or a link to the app editor?
However, when they click the “wisselen” button on another group in the RG, the other groups should close again. That does not happen, here is the wrong result ( two groups are visible)
When you click the wisselen button, what are you doing to show the group? Can you send screenshots of the editor window for the group with the conditions and also the workflows for the click event?
Create a custom state of type number, in the main group, which contains the RG, or in the RG itself (or wherever you want).
Then, when clicking on the button, define the value of the state created to receive the Index value of the current cell (to which the button belongs).
In the group that expands when the button is clicked, define a conditional so that it is visible only if the value of the custom state is equal to the index value of the current cell.
Note that I gave the example of creating the custom state with the value of type number, but it could be anything that can uniquely identify each cell of the RG. For example, the data type of the custom state could be the data type of the RG itself. So, instead of sending the current cell’s index to the state, you would send the current cell’s own thing, making the necessary adjustments to the conditional in the group.
Ha!
It defnitely works, I think were I went wrong is I used Toggel to open a group and tried to use a state or DB value to close…anyway, this works like a charm so thanks!
In this case, you can use a toggle-type WF, but also put the conditional in the WF (not in the steps, in the WF) so that the toggle action is only performed if the value of the custom state is equal to the index of the current cell (if using index as the control data type).
Or you can create two triggers on the button (2 WFs), each with a condition.
1 - when the custom state current value is not the value of the current cell > set the value of the custom state to the index value of the current cell;
2 - when the custom state current value is equal to the current cell value > set the state value to empty;