Extracting Scaffolding Data from Children Pages
This recipe is relevant for page structures containing Parent page to Children page to Descendent:

In the sub-child page, a table can be wrapped inside Scaffolding's Table Data macro.
For example:

It’s possible to configure the 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.
Apps | |
---|
Platform | N/A |
---|
Level | |
---|
Estimated time | |
---|
Macros | |
---|
Suppliers | |
---|
You can copy and paste this code into the Confluence Source Editor:
<ac:structured-macro ac:macro-id="7aa5a7ce-548c-44f2-97a4-bd249f1bdab8" ac:name="report-table" ac:schema-version="1">
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="75216dd3-3a00-4f22-94e8-f850ea1c4fa6" 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="10f217ea-97ba-47db-a864-a1ceb86961a2" ac:name="content-reporter" ac:schema-version="1">
<ac:parameter ac:name="types">page</ac:parameter>
<ac:parameter ac:name="scope">Parent Page Title X > 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="c75a4217-2a0a-4069-b515-2f462dc935dc" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Page Title</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="9291fdc8-df23-4a60-b87a-19178d16dcc6" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="render">richtext</ac:parameter>
<ac:parameter ac:name="">expanded:item>page:title</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="b9e633af-211a-4806-897f-104799def0d5" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Text Data</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="3daef40d-9c8b-445b-99ea-6e7a2d2d8e83" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="render">richtext</ac:parameter>
<ac:parameter ac:name="">expanded:exr>data:textData</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
You can recreate the example in the editor view:
- Add a report-table macro.
- Add the expanding-reporter macro within a report-table macro and specify the following:
- Key: data:tableData
- As: exr
- Match All: true
Add a content-reporter macro within expanding-reporter macro and specify the following:
- Spaces: @self
- Types: page
- Scope: Cafe Rockettoria Projects > descendents
- Match All Criteria: true
- Add a report-column macro within the report-table macro and specify the following:
- Title: Coffee Machine Details
- Add a report-info macro within the new report-column macro and specify Key as expanded:exr>data:textData
- Add another report-column macro within the report-table macro and specify the following:
- Title: Remarks
- Add text-data macro within the report-column macro above and specify Field Name as "remarks".
- Save the page.