Placeholder configuration

Placeholder configuration

Placeholders can be added to AQL query if you want your users to be able to filter based on specific attribute. Placeholders are added into the AQL query in the format of {{<enter any name>}} and its value will get replaced by the selection the user makes. You can add multiple different placeholders and also the same placeholder in multiple places, if needed.

Configuration example

Let’s imagine we want our users to be able to view all laptops based on the status value they choose. Without filtering we would have to create multiple different queries and configurations, such as:

objectType = Laptops AND Status in (Active)
objectType = Laptops AND Status in (Active, Ordered)
objectType = Laptops AND Status in (Returned, Offline)

Instead of doing that, it is better to add placeholder instead of status values and let the user select, for which statuses they want to see the laptops. To do that, the status values must be replaced with a placeholder, for example:

objectType = Laptops AND Status in ({{status}})

Now, the user can select a status for which they want to see the list of laptops and the query is automatically updated.

image-20250221-141922.png
AQL query configuration

Configuring the filter

In the next step (labeled Filtering) in the configuration wizard, we need to configure our filter.

image-20250221-143441.png
Filter configuration example
image-20250221-143550.png
End result (note the filtering field top-left)

Filter type

Select one of the following:

Filter type

Explanation

Filter type

Explanation


Attribute - single select

Allows user to select one or multiple values of specific attributes.

If using multi select option, make sure you format the placeholder as
Status in ({{status}}) as opposed to
Status = {{status}}.


Attribute - multi select


Text field

Allows user to filter based on some text value. Placeholder could be, for example: Name LIKE "{{name}}".

Filter title

Shown as the field label for end-user.

Object type and Attribute

Select the object type and attribute, based on which you want to filter.

Only visible if Filter type is Attribute - single select or Attribute - multi select.

Additional AQL query

This allows to add additional AQL filtering for the filter value options shown to users. For example, if you want exclude specific statuses from the list available for selection, you could insert following query: Status != "Retired". In this case, the RETIRED status would be excluded from the list of statuses shown to users, based on which they can make the selection.

Select default value

It is usually a good idea to set the default value for filter. This means that when the Confluence page with the macro inserted is first viewed, some data is already shown for the user.