Forum Academy Marketplace Showcase Pricing Features

Single Page App: Passing data from Repeating Group to a Group?

Hi!

I’m building a single page app.
I have a page (group) with a RG with a list of Invoices. When I click on a specific invoice, the invoice opens in another page (group).

How do I pass data from the RG to the Invoice? Or how do I set the data source of the invoice to be the RG list?

Thank you for your help.


@sylvainn

This doesn’t answer your question directly, but the necessary concepts needed can be seen in this video (rather a walkthrough than instructional but pretty insightful nonetheless):

1 Like

Set the datatype of the invoice view group as invoice, then all groups and elements within that group set to reference 'parent group’s invoice.

When you do your workflow for hiding the invoice list group and showing invoice view group then add a step for the element action ‘display data’ and choose the group element and the data would be ‘current cell’s invoice’

Alternatively you can actually have it as a hidden group in your RG…look up accordion menus :slight_smile:

1 Like

I tried to do as you said. I don’t know where I mess up. But it doesn’t update the data of the invoice.

Maybe the problem comes from the architecture. I have a RG (invoice list) with groups. And I have a Group that I can click in my RG to open the invoice. This Group is in my RG over all the other groups. (See screenshots of Elements tree.)
Screenshot 2021-05-31 at 17.29.40




if you’ve set up your RG to be an accordion menu style you don’t need to use a display data WF because it’s all under the same parent RG group and the data can be sourced from there. You should always be choosing ‘current cell’s invoice’ or ‘parent group’s invoice’ as your data source and just showing or hiding groups.

Use the ‘toggle’ action rather than show/hide on an accordion menu :slight_smile: this will automatically open and close it when you click on the clickable group.

So you will just need to check all your groups to make sure they all have the data source entered. What is the parent group for Group Invoice Details? Have you set it’s data source correctly?

1 Like

I sort it out.

So, my Group Invoice Details is in a separate group:
Type of content: Invoice
Data Source: Parent group’s invoice

In my RG list of invoices, I have a group over the row that is clickable to open the invoice.

Workflow when this group is clicked:
Step 1: Set state

  • Element: the RG Page
  • Custom state (text): View details
  • Value: “details”

Step 2: Go to page

  • Destination: RG page
  • Data to send: current cell’s invoice

On the Group Invoice Details group, I added conditions to make visible the element related to the custom state.

The Element actions / Display data from group wasn’t working for me.

I didn’t want an accordion style. I wanted the invoice appear on a separate page (group).

Once again, thank you so much for your help!