---
title: "Group and retrieve data"
canonical: "https://support.appfire.com/space/SCAFS/477599339/Group%20and%20retrieve%20data"
format: markdown
---
> Macro (aura-html)

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](https://appfire.atlassian.net/wiki/x/Gpl3H) 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.

![image](media://a1bea4c9-87d7-4b86-8c2d-1f1f104514b3)

3. Add the following details to the second column:

- [Text Data](https://appfire.atlassian.net/wiki/x/bpl3H) macro in the first row** **with **Field Name **set to `name` and **Content Type **set to `text`
- [List Data](https://appfire.atlassian.net/wiki/x/AJl3H) macro in the second row with **Field Name **set to `jobtitle`
- [Text Data](https://appfire.atlassian.net/wiki/x/bpl3H) macro in the third row with **Field Name **set to `position` and **Content Type **set to `text`

4. Add three [List Option](https://appfire.atlassian.net/wiki/x/_Zh3H) macros in the List Data macro. Add **Value** and **Label** of `Mr`, `Mrs`, and `Ms`, respectively, to each List Option macro.

![image](media://7be170d4-7eb4-474b-8353-2e85a104fb8b)

5. 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.

![image](media://0734066f-e69c-4e6e-a84c-37c67a20ecdc)

## 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`.

![image](media://a9e1a265-9dc4-4e91-9728-27c1b3311969)

2. Add six [Get Data](https://appfire.atlassian.net/wiki/x/gJh3H) macros; one macro for each empty cell.
3. 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).

![image](media://1793bd16-6f63-4b22-91aa-09ed5cda6d31)

4. **Save** the page.
5. Click **Edit Contents **and enter some information in the form.
6. **Publish** the content in the form.

## Notes

When defining [Get Data](https://appfire.atlassian.net/wiki/x/gJh3H), use** **`<groupName>.<dataName>` for the **name** parameter.

## Result

![image](media://2a977fe7-9b56-4438-a13e-89075d968f91)