Group and retrieve data

Group and retrieve data

You can use Scaffolding macros to group data, and then, retrieve it.

Ingredients

Apps

Scaffolding

Macros

Group Data, List Data, Text Data

Step 1 - Group data

  1. Create a Group Data macro and name it HRperson.

  2. Inside the Group Data macro, create a 2x3 table with Name, Title, and Position headers in the first column.

  1. Add the following details to the second column:

  • Text Data macro in the first row with Field Name set to name and Content Type set to text

  • List Data macro in the second row with Field Name set to jobtitle

  • Text Data macro in the third row with Field Name set to position and Content Type set to text

  1. Add three List Option macros in the List Data macro. Add Value and Label of Mr, Mrs, and Ms, respectively, to each List Option macro.

  1. Repeat steps 1 to 4 to create another set of macros. Change the Group Data name to ITperson while keeping the rest of the properties the same for all the macros as shown in the image below.

Step 2: - Retrieve data

Collect all the data from the macros we created before and compile them into one place.

  1. Create a table with column headers Title, Name, and Position.

  1. Add six Get Data macros; one macro for each empty cell.

  2. Enter an appropriate Field Name value with the format of <groupName>.<dataName> for each macro.
    For example, in the first cell, you can use HRperson.jobtitle (based on the title and group name you provided in the above steps).

  1. Save the page.

  2. Click Edit Contents and enter some information in the form.

  3. Publish the content in the form.

Notes

When defining Get Data, use <groupName>.<dataName> for the name parameter.

Result