Workflow sequence de-prioritising checkbox custom state

First bubble app here :slight_smile: Need some help!

I have a list of items (colors, in this case) on screen available for selection. By default it displays all the previously selected colours as selected, and user can udpate them. To save DB calls while changing selection for each color checkbox, I’ve created a custom state that gets updated on each select/de-select action. And then finally it saves this in DB when user clicks on Save.

This works beautifully while in debug mode. If I remove the debug mode, the Save button click seems to be executing before setting the custom state on “G Color clicked” [the checkbox in the repeating group]. And hence it does not update the color selection changes. What am I doing wrong?

Here’s the app: foo | Bubble Editor

Hi there, @usha… your issue is probably the fact that you are adding the color to the list and removing it from the list in the same workflow event. Try using two workflow events with the conditions at the event level, and see if that produces the desired result.

Hope this helps.

Best…
Mike

Thanks for checking @mikeloc. I originally had them as two workflow events, I then combined to see if that helps. Split them again now as two workflow events, the issue seems to persist…

I just ran it as the only user in your database, and it appears to be working as expected. What issue are you seeing?

Did you try it on debug mode? It’s working as expected in debug mode, but not in the non-debug mode:

Ah, okay… I did run it in debug mode, and it does not seem to work with debug mode off, but I have no idea why. Maybe try changing the conditions to check if the current cell’s color is already in the list or not instead of checking the state of the checkbox.

Thanks a bunch @mikeloc :+1: It’s working now. In some race condition, sometimes it doesn’t seem to register the checkbox clicks. But I can live with this for now :slight_smile:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.