I am attempting to delete items in an RG using three taps (to be sure, to be sure, to be sure).
First I tap a red trash-icon in the floating group on top of page and that makes small red circle-minus-icons appear on the left of every row in the RG.
Tapping a red circle-minus-icon toggles a red delete-button to appear on the right of that specific RG row. Tapping that delete button deletes the entry.
If I tap the red trash-icon again it hides the red circle-icons as I wish but it fails to hide any red delete-button on the right that were visible when I tapped the trash-icon.
I’ve read about precedence in bubble, I’ve tried at least 25 different things, and I’m ready to admit that I’m stuck. Not to mention a little rusty because I have not produced software for 28 years.
First, set a yes/no state - let’s call it Visible - on your DELETE button (or on any element within your repeating group cell). Rather than use a “Toggle” action when you click the minus icon, you’d set this Visible field to yes or no. So two actions: 1) When minus icon is clicked and button’s Visible is no, set button’s Visible to yes. 2) When minus icon is clicked and button’s Visible is yes, set button’s Visible to no. You’d then have a conditional on your DELETE button: When this button’s Visible is yes and Full Customer List’s Mode is DELETE > This button is visible. Like so:
This accomplishes what you have currently. But now when you re-click the trash icon, the DELETE buttons will disappear because their visibility is also dependent on this state. You’ll want to avoid using the Toggle action here because once you toggle an element’s visibility via a workflow action, that element won’t respond to visibility conditionals based on states until the page is reloaded.
Thank you David, your instructions were easy to follow and its works perfectly. The final sentence “You’ll want to avoid using the Toggle action here because once you toggle an element’s visibility via a workflow action, that element won’t respond to visibility conditionals based on states until the page is reloaded.” suddenly made me see why my numerous experiments were failing.
Read the AirDev story on Medium a few days ago, and visited your website. If things go as planned I hope to be in touch with you guys in the coming months - once I get my MVP into the market and capture feedback.
David, I just realised that if I tap the trash icon for a 3rd time, the Delete Button’s that had been visible reappear. More accurate usability is that they would not show again until/unless the minus icon on the row was pressed again.
I can’t find any way to reset the state of the button inside the RG when it is the trash icon, which is outside the RG, that is tapped. Is there a way to do this that I’m not seeing?
@patricia, no problem happy to help. We’ll look forward to hearing from you in the future! If you get stuck in your MVP efforts, don’t hesitate to reach out.
In terms of reaching this more accurate usability, let’s try this:
I think this will actually simplify things a bit. The difficulty here is with targeting something inside a repeating group cell. Rather than use a yes/no state stored within the cell, let’s use a state stored on the repeating group itself (or anywhere on the page). Steps (RG meaning repeating group):
-Add a state on the repeating group which is a list of numbers. We’ll call this Open Cell Numbers
-Create a group (type number) in your repeating group cell. Set the data source to current cell’s index. This group has to be at the root level of your repeating group cell to make a reference to the index. We’ll call this Group RG Index
-When the minus icon is clicked within a given cell, instead of setting a yes/no field to yes or no, you’ll want to add (or remove) the repeating group’s cell number (you can reference Group RG Index’s number) from the repeating group’s Open Cell Numbers state. So two possible workflows when minus icon is clicked: 1) If RG’s Open Cell Numbers doesn’t contain Group RG Index’s number, then set state Open Cell Numbers to Open Cell Numbers: plus item Group RG Index’s number 2) If RG’s Open Cell Numbers contains Group RG Index’s number, then set state Open Cell Numbers to Open Cell Numbers: filtered: Constraint: This number is not Group RG Index’s number.
-Update your conditional on the DELETE button to: RG’s Open Cell Numbers contains Group RG Index.
-Now whenever you click the trash icon, add a workflow that clears Open Cell Numbers (so set the state to nothing). This should cause all the DELETE buttons to reset whenever the trash icon is clicked
Bonus: If you want to have it so only one DELETE button shows at a time, you would change this Open Cell Numbers to be not a list, but a single number - and maybe lose the “s” at the end of the name. Then you’d update step 3 (clicking the minus icon) to simply set the Open Cell Number state to Group RG Index. Lastly, the conditional on the DELETE button would be: Open Cell Number is Group RG Index’s number.
Let me know if any of this is confusing. I sort of whipped it up in a test app I’m happy to share it if you’d like.