Grouping and Retrieving Data
Let's use Scaffolding to group data and then retrieve it.
Ingredients
Apps | Scaffolding |
---|---|
Macros | Group Data, List Data, Text Data |
Guide
Create a Group Data macro and name it "HRperson."
Inside that Group Data macro, create a table like the one below:
Now create two Text Data macros, a List Data macro and a set of List Option macros, like in the following image:
Give the first Text Data macro a Field Name of "name" and a Content Type of text.
Give the second Text Data macro a Field Name of "position" and a Content Type of text.
Give the List Data macro a name of "jobtitle" and the List Option macros a value and label of "Mr", "Mrs", and "Ms" respectively.
Now create another set of macros by repeating Steps 1 - 6, but this time change the Group Data name to "ITperson", while keeping the rest of the properties the same for all the macros.
You should have something like the following image:Now let's collect all the data from the macros we created before and compile them into one place.
Create a table like this:Add 6 Get Data macros, one for each cell.
For each macro, enter an appropriate Field Name with the format of groupName.dataName.
For example, for the first cell, you can use "HRperson.jobtitle" (based on the title and group name you provided in the above steps).
You should have something like the following image:Now save the page and click Edit Contents.
Enter some information into the form and check out the results.
Notes
When defining Get Data, use groupName.dataName for the name parameter.