Listing Attachments from Another Page

Scenario

The Attachments macro only extracts attachment information from the current page. To retrieve information on attachments in other pages, use the recipe below.

In the example, the macro retrieved the first 6 attachments in a page called "Aircraft Parts" in the space "PLANE" and formatted the results in a table sorted by attachment name.


Result


Recipe

Ingredients

Add-ons

Reporting

Platform

N/A

Level

EASY

Estimated time

15 minutes

Macros

Suppliers

Storage format

Macro structure

You can recreate the example in the editor view:

Steps

  1. Create a Report Table macro.
    Set Maximum Results to "6".

  2. Within the Report Table, create a Local Reporter macro.
    Specify the following parameters:
    • Key: content:attachments
    • Source: PLANE:Aircraft Parts

  3. Within the Local Reporter, create a Text Sort macro.
    Set the Key to attachment:title.

  4. Within the Report Table, and beneath the Local Reporter, create a Report Column.
    Set the Title to "File Name".

  5. Within the Report Column, create a Report Info macro.
    Specify the following parameters:
    • Key: attachment:title
    • Link to Item: true

  6. Within the Report Table, create another Report Column.
    Set the Title to "Comment".

  7. Within the Report Column, create a Report Info macro.
    Set the Key to attachment:comment.

  8. Within the Report Table, create another Report Column.
    Set the Title to "Size".

  9. Within the Report Column, create a Report Info macro.
    Set the Key to attachment:nice file size.

  10. Within the Report Table, create a Report Empty macro.