---
title: "attachments-report macro"
canonical: "https://support.appfire.com/space/COMALACM/655759560/attachments-report%20macro"
format: markdown
---
> Macro (aura-html)

## <span style="color: #091e42">Overview</span>

<span style="color: #091e42">The </span>`attachments-report`<span style="color: #091e42"> </span><span style="color: #333333">macro generates a report of all the attachments on a single page.</span>

## Parameters

| Parameter | Required | Default | Notes | Version |
| --- | --- | --- | --- | --- |
| `value-name` | ![image](media://d3921de2-d3da-4878-9c66-90e75c488bba) |  | <span style="color: #000000">The list of fields (columns) as a comma-separated list to be included in the report. This can include added metadata and internal metadata.</span> |  |
| `sort` |  |  | <span style="color: #000000">Specifies which column in the report should be sorted by. You can include sort method such as</span><br>- `value-name desc`
- `value-name desc`<br><span style="color: #000000">You can also specify how to treat the values:</span><br>- `as date`<span style="color: #000000"> (for internal date field) metadata only</span>
- `as number`
- `as string` (makes sort case insensitive) |  |
| `maxResults` |  | 500 | Specifies the number of results to be returned. |  |

## Usage

To retrieve the metadata from matching attachments on the current page

- Choose the **Page Attachments Report** using the Confluence macro browser

![image](media://f1aab912-b697-466a-89c1-8edac361dc55)

The macro requires the metadata for the report to be entered to the macro editor.

![image](media://5203b213-9592-4816-847e-a9e99f82c6b0)

There are no additional options to add to the macro in the macro placeholder.

![image](media://9cba868a-1ac2-4a44-91f5-2c5c254bff99)

The macro displays the metadata values for the attachments on the current page in a tabular format.

![image](media://74beac71-9417-4925-a24b-aa1afa63eee6)

The number of results (default 500) can be added to the macro editor. If required, the display of the results can be sorted on a selected column.

## Reference markup

```plaintext
{attachments-report:Title,Author(s),Comments,Time Created|sort=Title desc|maxResults=5}
```

## Related macros

> Macro (children)

## Related pages

- [Reporting and Searching](https://appfire.atlassian.net/wiki/spaces/COMALACM/pages/656577723)