Set custom state of element inside repeating grid

Hello

I have a repeating group, and inside each element of the group there is an element with custom state attached to it.

I would like this state to be updated as part of a workflow. However, when I attempt to build a workflow to achieve this, the workflow action doesn’t seem to have access to the element inside the repeating group. Therefore, I am not able to modify its state. Am I doing something stupid here?

  1. Screenshot showing custom state against my element called orderItemDetails

  2. Screenshot showing that this element doesn’t appear when attempting to define the action in the workflow context
    Screenshot 2023-02-10 at 12.48.50

Guidance appreciated, thank you!

Anything inside a repeating group can be accessed only from inside the repeating group.
For example: if you have a workflow triggered by an element outside the repeating group you will be able to access only elements outside the repeating group in this workflow.
Instead if you have a workflow triggered by an element inside the repeating group you will be able to access the elements outside the repeating group plus the elements inside the repeating group in this workflow.

1 Like

Thanks @dorilama!

I’m not entirely clear how I can trigger this workflow from inside my repeating grid. Ideally, I would like the workflow to trigger as soon as the element is loaded. Previously I had it triggered on page load, which sounds like it won’t work for the reason you outlined. There doesn’t seem to be a trigger for on element load. What’s the right approach here?

Thanks :pray:

You need a workflow triggered from an element inside the repeating group (eg. a button click in a cell of the rg)

A workaround is creating a very simple plugin element, with just an input field and the ability to trigger an event. Then in the update function you simply add instance.triggerEvent('update').
Put the element in the repeating group, assign a value to the input field and you get your event from inside the repeating group without user interaction.

Installed the “Loaded Trigger” plugin (Loaded Trigger Plugin | Bubble) and inserted the RG trigger into nested repeating groups to retrieve nested cell indices, which works brilliantly but I get the following error message: “workflows could not run because too many events triggered at the same time.”

Any ideas on how to prevent this from happening, or is this just an inevitability with nested repeating groups and RG even triggers?

since this is a specific question about a plugin it’s better if you start another topic, so that the author of the plugin, or someone else can see it and reply