---
title: "Extract Scaffolding data from child pages"
canonical: "https://support.appfire.com/space/REPS/472916654/Extract%20Scaffolding%20data%20from%20child%20pages"
format: markdown
---
> Macro (aura-html)

## Scenario

This recipe is relevant for page structures containing Parent page to Children page to Descendent:

![image](media://11650c23-feb5-4f3f-80d7-4a6356aa5c75)

In the sub-child page, a table can be wrapped inside a Scaffolding [Table Data ](https://appfire.atlassian.net/wiki/spaces/SCAFS/pages/477600119)macro.

For example:

![image](media://419d2f56-aad9-4dfc-ade3-6eccc2362842)

It’s possible to configure the Scaffolding Text Data macro inside the table to get user input. 

This recipe shows how to extract text from the Text Data macro (nested inside the Table Data macro) and display it as a report on a different page.

## Result

![image](media://14e0bcd5-33ff-4c01-9d37-64127b67ca05)

## Recipe

| Apps | Reporting for Confluence Data Center, Scaffolding Forms & Templates for Confluence Data Center |
| --- | --- |
| Level | Intermediate |
| Estimated time | 20 minutes |
| Macros | Content Reporter, Expanding Reporter, Report Column, Report Info, Report Table |
| Suppliers |  |

## Storage format

You can copy and paste this code into the [Confluence Source Editor](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472907841):

```
<ac:structured-macro ac:macro-id="5cd5efc8-16f3-47f8-bf15-b6c14c3395c2" ac:name="report-table" ac:schema-version="1">
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="84442ddf-7cc8-48db-9a95-2d8d9d5bc14e" ac:name="expanding-reporter" ac:schema-version="1">
      <ac:parameter ac:name="as">exr</ac:parameter>
      <ac:parameter ac:name="">data:tableData</ac:parameter>
      <ac:rich-text-body>
        <ac:structured-macro ac:macro-id="e81ac7af-a9e7-4060-834b-de862bc0d5b5" ac:name="content-reporter" ac:schema-version="1">
          <ac:parameter ac:name="types">page</ac:parameter>
          <ac:parameter ac:name="scope">Cafe Rockettoria Projects &gt; descendents</ac:parameter>
          <ac:rich-text-body>
            <p>
              <br />
            </p>
          </ac:rich-text-body>
        </ac:structured-macro>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="4aaccd87-af65-4a40-8a30-fb1d0f41deca" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Coffee Machine Details</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="268e03e0-e2ee-4239-8ad5-a9ecb6cf9b34" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="">expanded:exr&gt;data:textData</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="096e80eb-6351-445e-bdaf-65f857bae186" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Remarks</ac:parameter>
      <ac:rich-text-body>
        <ac:structured-macro ac:macro-id="b70e3cef-1bb2-43b7-a089-886d8ddf2a90" ac:name="text-data" ac:schema-version="1">
          <ac:parameter ac:name="name">remarks</ac:parameter>
          <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
          <ac:rich-text-body>
            <p>
              <br />
            </p>
          </ac:rich-text-body>
        </ac:structured-macro>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>

```

## Macro structure

You can recreate the example in the editor view:

![image](media://94e191c0-115a-4490-8f0b-03541d5409c2)

## Steps

1. Add a report-table macro.
2. Within the report-table macro, add an expanding-reporter macro and specify the following:  
- **Key**: `data:tableData`  
- **As**: `exr`  
- **Match All**: `true`
3. Within the expanding-reporter macro, add a content-reporter macro and specify the following:
  - **Spaces**: `@self`  
- **Types**: `page`  
- **Scope**: `Cafe Rockettoria Projects > descendents`  
**- Match All Criteria**: `true`
4. Within the report-table macro, add a report-column macro and specify the following:  
- **Title**: `Coffee Machine Details`
5. Within the report-column macro, add a report-info macro and specify the following:  
- **Key**: `expanded:exr>data:textData`
6. Within the report-table macro, add another report-column macro and specify the following:  
- **Title**: `Remarks`
7. Within the *Remarks *report-column macro, add a text-data macro and specify the following:  
- **Field Name:** `remarks`
8. Save the page.

The output should be as below. In this example, since the data is extracted from Text Data, the content whether formatted as a paragraph or header will follow

![image](media://8f7ee513-4e6d-4988-8cb3-21269231a0d9)