Forum Academy Marketplace Showcase Pricing Features

Sections in Repeating Group

Ive been trying to create sections within a repeating group and cant for the life of me figure out how to do it.

  1. The database looks like this - Line Item (Name, Location)

  2. I do not want to have a nested datastructure. I would like it to be flat so its easy to modify as my app expands.

  3. Filter all of my line items according to the location, and add the said location as sort of a header within my repeating group. I only want to show this header once, and not multiple times.

  4. Ive tried to solve this by essentially creating a repeated group inside of another repeated group, but this doesnt allow me to have the flexibility that I want to have.

  5. When I change the location inputs, all of the line items previously with that location will also have their property changed. ie if I change the LOCATION 1 input to “kitchen”, Line Items 1-4 will all have their locations likewise changed to “Kitchen”

  6. When I click + Add New Line Item, it creates a new blank line item under the location section that Ive added it to. Ie if I click + Add New Line Item under the LOCATION 1 section, it will add a new blank line item underneath Line Item 4. In the database, it creates a new Line Item entry with LOCATION 1 as the location.


Cheers
Sam

you need to use the group by operator…not sure the exact setup for your use case but I believe if you dive into the :group by operator on a RG data source you’ll get what you need.

Thanks! Yeah group by operator makes sense. How would I insert those breaks that contain the location titles as well as the add new line item button into the structure of the repeating group?

Ie I want line items 1-12 to be part of one big repeating group, with the location titles and add line item buttons inserted into the structure almost as section breaks. These breaks “talk” to the line items in the mini section and pull data from them. Ie it displays the location info of all the line items in that mini section