Ive been trying to create sections within a repeating group and cant for the life of me figure out how to do it.
-
The database looks like this - Line Item (Name, Location)
-
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.
-
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.
-
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.
-
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”
-
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