Changing states in Repeating Group

Hi Guys, I have a RG showing data with a constrain set to yes…example - Event is Live - Yes or No

Now I want to toggle my repeating group between this Yes or NO state without using 2 RG. Is it possible to achieve this in the same RG on the click of a button…

Please help

Yep!

  1. Create a custom state of type yes/no and specify a default value (call it myState for this example)

  2. Make the constraint value in your search equal to that custom state’s value

  3. On button click → set state of myState = “myState is no” (this toggles the yes/no)

1 Like

Hi,

Thank you so much. I did a quick POC and it worked.

Quick question my toggle is working. Small issue, when the database has no default value they are also visible in RG. How to avoid that?

Ideally none of those values should be blank… a yes/no value should have one of those values i.e. true or false. If it’s blank I believe Bubble interprets it as false.

I’m not at my computer at the moment but from recollection there’s an option to “ignore empty constraints”

1 Like

Ya, I did that. Made default to NO but the issue still persist.

I will try the other, I think it will work. Must be some silly mistake… in case I need help with send a quick video…