Repeating Groups - Conditional based another Repeating Group

I’m working on my first app and I want to show two repeating groups, where the second RG draws data from the first.

RG 1 (top) is showing a piece of real estate (Parcel). Each user can have multiple Parcels and in turn, each Parcel can have multiple Structures, which will be shown in RG2 (bottom).

The User can scroll left or right through the created Parcels in their user profile.

My question is how do I get the structures in RG2 to change based on the Parcel being shown in RG1.

IE: If RG1 has a parcel that has one house and one shed, RG 2 should reflect that. Once the user scrolls right or left to another Parcel, RG2 should show the new Parcel’s structures.

Hi there, @anon65927656… one way to do what you described is to set a custom state to the current cell’s parcel as the user scrolls through the parcels in the first repeating group, and refer to the custom state’s value to get the information for the second repeating group. Have you tried something like that already?


I haven’t ventured into custom states, yet, but this is a good vehicle for that attempt. I’ll take a look at that.

1 Like

Ok, I tried tackling the Set State concept. Initially, my thought was to use the workflow trigger “Page is loaded” to set the state on RG2 from the data displayed in current cell in RG1.

The option to do so doesn’t present itself for some reason. I do have groups inside of the repeating groups, so I don’t know if that’s the issue, but I’ve tried a variety of ways but can’t get the option to select current cell’s value.

So, first, and just food for thought, you might want to consider keeping all of your custom states at the page level so they are easier to manage.

When the page is loaded, set a custom state with a state type of Parcel to a value of RepeatingGroup Parcel's List of Parcels:first item. Then, set the data source of the second repeating group to the custom state’s structures (i.e., select the custom state and add Structures to the end of the expression). Finally, as the user scrolls through the parcels, set the custom state to the current cell’s parcel.

I played with a few variations here to make it work and I’m not quite there, yet.

I set the custom state on page load (see work flow picture).

I attempted to link RG2 to the custom state set for the page (UserParcels) with the custom state (UserParcels).

Previously, before I asked for help, all structures would show up in RG2 and would not change based on the parcel changing in RG1.

Now, no data shows up in RG2 on preview. Does this mean that I’m not using the right dynamic reference data in the text fields in RG2 now that I’ve changed the relationships?

I solve something similar with a paid plugin called bdk RG group or with data extraction (BDK )

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