Group by Field in Repeating Group

Hey @nunomneto :slight_smile: I’m still practicing this as well, but I think one possible way would be to have the data structure contain three types: Paper, Weight, PaperWeights (to ‘join’ Paper and Weight combinations):




You would then create your Papers (1, 2, 3) as Things, and Weights as Things (80, 100, 120). You could do this manually through the Data tab, or through a workflow on a page:

With the workflows being:

Once you have those stored in the database, you can then create the different combinations of Papers and Weights. To do this through a workflow, you could use two dropdowns which allow you to select a Paper, a Weight, and then the workflow creates a new PaperWeight:

Dropdown Paper’s Settings:

Dropdown Weight’s Settings:

In preview mode, if you were trying to create a combination of Paper 1, and 80 it would look like:

Then the workflow for “Create PaperWeight” creates that combination as a PaperWeight Thing, and then adds that PaperWeight to the Paper’s PaperWeightsList and the Weight’s PaperWeight’s List. *You don’t have to store the combinations on Papers and Weights, but it may come in handy at some point!

Create A New PaperWeight:

Add that PaperWeight to the Paper’s PaperWeightsList:

Add that PaperWeight to the Weight’s PaperWeightsList:

Last but not least! In the repeating group, you can set the type of content to be: Paper, and the data source as “Do A Search for Papers”. Then place a text element in that cell which is “Current cell Paper’s Name”. This will make sure the Paper Name only appears once in the repeating group:

Then in that same cell, place a second nested repeating group beneath the text element of the paper name. Have that repeating group be type PaperWeight, and the data source be Do A Search for PaperWeights, with the constraint in the search being: Paper = Current cell’s Paper. Then place a text element in that cell which is “Current cell’s PaperWeight’s Weight’s Number”. This will make sure that there is a list of Weights available, associated with the cell’s Paper.

And in preview mode, it looks like:

*You could customize the style/text to anything you prefer of course!

I hope this wasn’t too confusing, and feel free to let me know if you have any questions at all. :slight_smile:

More information on structuring these types of things can be found incase you’re interested: