Toggle items in a repeating list

Hey bubble community,

i am fairly new and still trying to figure stuff out here. Most stuff i could figure out by myself but this one is giving me a headache for quite some days now.

I am creating some kind of timer for Pen & Paper players. The DM has a Date/Time picker where he can change the time in the world.

He can create events that are stored in a repeating list. These Events have an “expiration time”. When that is reached, the DM gets a warning.

For example: The oil in a Lantern of Player 1 only lasts for 6 hours. DM creates a new event “Lantern” with 6 hours. If he advances the game time 10 minutes forward, the lantern timer will Show 5 hours and 50 minutes and so on.

I got that part working fine so far. But now i want to add another feature: the DM should be able to “toggle” and item in that repeating list.
In our example this could mean the player turns off the lamp for 2 hours. This requires that the “time left” value doesn’t get changed when the game timer advances.

TL;DR
The problem is: I am unable to access checkboxes or toggles in a repeating list in my workflows. Am i missing something?
If bubble doesn’t allow that, is there a possible workaround?
Thank you for taking your time to read this :slight_smile:

Any help and ideas are greatly appreciated!

Hi there,

Great Idea !

No, you are right, bubble does not allow you to do “the third item down” type processing.

So you need to activate a workflow from within the RG itself. So “current cell’s xxxx” and run a workflow on that.

1 Like

Hey,
thank you for your quick reply to my question!

Sadly, i didn’t quite understand how to run a workflow from within the RG itself yet.
How can I access the current cell’s content? And how can i start a workflow from that point?

If you put a toggling element (for example an ionic toggle, its a plugin) inside the repeating group. You can then access it in workflows by using “element is changed (see below)”
Now you can do something whenever the toggle is changed. However you can still not access the state from outside (say for example when a button is pressed) As far as i understand anyway…

image

Well, the easiest way is to Autobind the Toggle to the yes/no field, that way you don’t have to run a workflow… however if you want to do other actions it is still pretty simple…

The workflow will give you the option to use “Current cell’s xxxxxx”.

That is the thing (record, object, row … whatever you want to call it) that is the cell that the action is triggered from.

image

Example here …

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