Metadata for Confluence

How to show all pages where Metadata field is empty

I want to create a list of pages where a specific Metadata value has not yet been entered. How do I do this?

Instructions

Solution 1

This solution may stop working in the future because it depends on functionality that is not officially part of CQL.

  1. Add a Metadata Overview macro to a page.

  2. In the filter section, add a filter for the Metadata set that contains your desired field. This will restrict search results to only pages with this Metadata set.

  3. Expand the Options with “Show”.

  4. In the field “Expert filter criteria (CQL)”, add

    siteSearch !~ "YOUR.METADATA.FIELD.KEY:[a TO z] "
    

(Go here if you need help to determine the key of the Metadata field. However, for space Metadata do not add the space key in front in this case ( metadatafield.fieldname instead of SPACEKEY.metadatafield.fieldname)

5. You can check the “Preview” to confirm that the results are as desired.

6. Save the macro and the page to display the results.

Conversely, to show only pages where this specific Metadata field is filled out, remove the exclamation mark (“!”) from the query.

Solution 2

There is another basic approach.

  1. Add a Metadata Overview macro to a page and filter for the Metadata set that your desired Metadata field is part of.

  2. Make sure that the relevant field is displayed as a column.

  3. Save macro and page.

  4. Sort the column with your Metadata field twice by clicking the field name in the heading, which will put empty values at the top of the macro.

The sort order is reset when the page is reloaded.