Accessing custom state of a Reusable Group

I have created a Reusable Element of a Reusable Group. It is basically a custom made selection box.

Reusable Group has its custom state which stores the selected option. It is at RG level, not at the individual cell level.

Now when I am using this RE in a page, which is basically a form where user chooses inputs, I am unable to read the custom state of that RG of the RE to create a thing when user submits.

What’s going wrong?

PS: I saw some threads which discuss similar issue, but I didn’t quite get what was the solution in those.

Hi mghatiya,

When you are using a reusable element on a page, the only state you can refer to, to exchange information between reusable element and page, is the custom state of the overall reusable element.

To reach this click on the reusable element, select i and select the entire element and configure a state there.

You will not be able to communicate directly between repeating group of reusable element and the page.

Therefore as the repeating groups data source, you could for example use a state for the entire reusable element.

Then on your page you can set that state of the entire reusable element.

Hope this helps, pm me if you need further help.

2020-05-04 22_36_05-Backends _ Bubble Editor

The solution is to use the bdk plug for env variable.

1 Like

Thanks. That helps.

Since my RE had only one element that was the RG, I erroneously assumed that RG’s custom state = RE’s custom state.

Now that that confusion is cleared, I have added a new custom state to RE.

However, now I don’t know how to make something like this happen “RE’s custom state = RG’s custom state, whenever RG’s custom state changes”. How to achieve that?

I am not able to put a workflow to change RE’s custom state within the workflow of RG, probably because it can’t access parent properties there (seems logical).

Never mind. It worked later.

Many thanks for the help!

1 Like

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