Send Data from Repeating Group to another Repeating Group

Hello Bubblers,

I’ve been trying to send data from a RG to another RG. I’ve not been able to achieve this.

I have the first RG that gets its content from an option set, now I want to be able to click on the cell of the RG and pass the data to another RG which will in turn use the data sent to it to display another list.

Any help or video tutorial will be appreciated.

1 Like

Hello! :slight_smile:
Custom states are your friend.
Second RG has a custom state on which it is (second RG) is based on.
The first RG passes/updates second RG’s custom state on click.

1 Like

Thanks for the response. I have only used custom states to hide/show elements on the page. So how do I send the data from the RG1 to the RG2?

You are welcome.
It will be in the workflows.
Screenshot 2021-02-09 at 14.51.54

You will “set state of an element” . Element will be the second RG.

Now its asking for the custom state.

Everything is explained in my first message.
You need to play around little bit.

Thanks for your help. I have search for videos on the custom states and found some really useful one. I have been playing around with this below.

I am trying to achieve: Whenever I click on a cell in the first RG, it should show the details (pictures) in the second RG. I have not been able to achieve this so far. The picture I want it to show is from the Products table in the database.

There’s no need to use custom states for this.

Just use the ‘Display List’ action in your workflow when the Product Category button is clicked, to send the required data to the second RG (the list of products).

The data source will be ‘Do a search for Products’ with a constraint to match the products category to the current cell’s category.

The only problem is you don’t currently have your data set up correctly - there is no Category option on your Product datatype, so no way to match products to categories.

So you first need to add a field on your Product datatype of ‘Product Category’ type in order to tie the two things together.

4 Likes

Thanks. You are a lifesaver! It worked.

1 Like

@adamhholmes

Hi Adam!

I also have this kind of issue.

I would like to send data from a RG to a reusable RG.

Unfortunately when I use display list, the reusable RG doesn’t show up in the element.

I was wondering if you had a way around.

Thank you!

If you’re using a RG inside a reusable element then you’ll have to do it with a custom state.

Have a custom state on the Resusable element, of the datatype of the RG, set to be a list.

The reusable RG data source will need to be the value of the custom state (the list).

Then, on your page, when you want to define the list for the RG to display, set the custom state on the reusable element to be the list you want to display (i.e the data from the first RG cell).

1 Like

Thank you.

The first RG is within group 1 and shows a list of course.

The reusable RG is within group 2 and should show a list of lessons.

When a course title from group 1 is clicked, it should hide the group 1 and shows the group 2 with the list of lessons attached to a course.