---
title: "Searching and reporting"
canonical: "https://support.appfire.com/space/CDCCL/629970361/Searching%20and%20reporting"
format: markdown
---
> Macro (aura-html)

## Document report

To see a report of the workflow activity for all the pages in the space, choose the **Document Report** link under **Space apps** in the Confluence sidebar.

![cdcc_documentreport_withcontentexpiryworkflow.png](media://c95761be-808f-417b-9984-6eb0b9717387)

> 📝 Pages without an applied workflow are not listed in the report.

The report can be filtered using the filter button options:

- one or more workflow states
- **My assigned approvals** for the current user viewing the report

## My assigned approvals

You can see the approvals that are assigned to you in the current space in the document activity report.

![cdcc_documentreport_myassignedapprovals_filter.png](media://6a247bbc-a1c8-4e53-af5f-54b8ef400abd)

The **My assigned approvals** filter entries are where the current user has been assigned as a reviewer, and the approval is still pending.

> ℹ️ You can also use a search filter on the Confluence search to find pages that are assigned to a specific person (see below).

## Document activity report

To view the record of the workflow events and actions on the current page, for example, who has approved or rejected the current document

From the **page tools menu **(ellipsis menu) on the page with an applied workflow

- select **Document Activity**

All approvals and rejections, together with comments and expirations, are recorded in the document activity.

![image](media://17006b3b-7b5a-4c20-968e-793c0072120e)

> ℹ️ If a user has been disabled or deleted the document activity will display the users username and the default avatar. The username name is the stored user display name for the instance.

The current d**ocument activity **can also be viewed by

- choosing the page tools menu **Attachments** option
- choose **Custom Contents**
- choose the added **Document Report** tab

![cdc_documentactivity_customcontents.png](media://b67b7a77-8207-4af9-b09b-76301eea85fd)

No attachment is displayed when

- <span style="color: #172b4d">the </span><span style="color: #172b4d">**document activity**</span><span style="color: #172b4d"> was removed (</span><span style="color: #172b4d">**Clear Document Activity**</span><span style="color: #172b4d">)</span>
- <span style="color: #172b4d">no workflow had been previously applied</span>

<span style="color: #172b4d">If there is no active workflow on the content but document activity was retained</span>

- <span style="color: #172b4d">the page tools </span><span style="color: #172b4d">**document activity**</span><span style="color: #172b4d"> option is not available but any previous document activity can still be viewed in this </span><span style="color: #172b4d">**Document Report **</span><span style="color: #172b4d">tab (after opening the page tools menu </span><span style="color: #172b4d">**Attachments>Custom Contents**</span><span style="color: #172b4d"> option)</span>

<span style="color: #172b4d">A user with </span>**edit**<span style="color: #172b4d"> or </span>**admin**<span style="color: #172b4d"> permission can clear the workflow history for a page by deleting the </span><span style="color: #172b4d">**document activity**</span><span style="color: #172b4d"> attachment.</span>

> 📝 A space admin can choose to remove workflow **document activity** for all content in the space using the **Clear **workflow history option in the [space settings Document Control dashboard](https://appfire.atlassian.net/wiki/spaces/CDCCL/pages/630952034).

## Document state macro

Add the [document state](https://appfire.atlassian.net/wiki/spaces/CDCCL/pages/631177668) page macro to display the current workflow state, the date of the change to the state, and the state expiry date (if an expiry is added).

![cdx_documentsatemacro_onpage_utcformat.png](media://70a90d49-588e-4dee-9224-35395bd869ed)

The [document state macro](https://appfire.atlassian.net/wiki/spaces/CDCCL/pages/631177668) is compatible with the Confluence

- page properties macro
- page properties report macro

## Document approvals macro

Add the [document approvals macro](https://appfire.atlassian.net/wiki/spaces/CDCCL/pages/631406773) page macro to display information for approvals in a selected workflow stat. 

The macro can be configured to display the

- overall status of the approval
- approval assignees
- latest approval decision for each assignee
- date of the reviewer decision
- reviewer comment

![image](media://5ca472fe-369a-46da-a9c3-b9ba94d00355)

The [document approvals macro](https://appfire.atlassian.net/wiki/spaces/CDCCL/pages/631406773) is compatible with the Confluence

- page properties macro
- page properties report macro

## Document activity macro

Add the [document activity](https://appfire.atlassian.net/wiki/spaces/CDCCL/pages/631472667) page macro to display dynamic information for the document activity for the workflow on a page.

![image](media://f15f7692-a4e2-4340-ba7d-8f7c5c176da1)

The macro can be configured to display one or more of the following for each document activity entry

- user
- workflow action
- workflow state
- comments added in the workflow popup for approvals
- date
- version

The [document activity macro](https://appfire.atlassian.net/wiki/spaces/CDCCL/pages/631472667) is compatible with the Confluence

- page properties macro
- page properties report macro

## Confluence Search Filters for workflow macros

Confluence provides macros that support CQL filters, like the [Content by label](https://support.atlassian.com/confluence-cloud/docs/insert-the-content-by-label-macro/) macro or the [Page properties report](https://support.atlassian.com/confluence-cloud/docs/insert-the-page-properties-macro/?searchId=F8TH9RXB7) macro. Comala Document Management adds a filter for "Workflow state".

For example, **Comala workflow state**.

![cdcc_filterbycontentmacro_comalaworkflowstate_filter.png](media://6c4d54b7-3220-4356-a562-a84130e53d91)

> ℹ️ The state value is case-sensitive.

Other workflow filters are:

- **Comala workflow enabled**
  - use boolean **true** to filter pages with an applied active workflow
- **Comala workflow final state**
  - use boolean **true** to filter pages in the final state of the applied workflow
- **Comala state expiration**
  - filter by state expiration by date options

### REST API CQL fields

If you are searching with your own app using the Confluence REST API the following field names should be used.

| Field | Field name |
| --- | --- |
| Workflow state | cw_state |
| Assigned approver | cw_approver |
| Workflow final state | cw_final |
| Workflow enabled | cw_enabled |

> 📝 cw_state search is case-sensitive.

```
cql=cw_approver="User id" and cw_state="Approved"
```

For example if User id is “`3e906250c93111a04b6191`“, enter `cql=cw_approver="3e906250c93111a04b6191"`