This function returns the key(s) of asset object(s) returned by the specified AQL query (Assets Query Language). In case the specified AQL returns an empty result, NULL is returned. In case the specified AQL is not valid, an error occurs. 

Syntax
getAssetsFromAQL(aql) #Output: Text list
Examples
Parser expressionDescription
%{getAssetsFromAQL("objectType=Phones")}
This example returns the key(s) of the asset object(s) with the object type "Phones", e.g.:
PTAS-1, PTAS-2
%{getAssetsFromAQL("\"OS Version\" = \"macOS Ventura\"")}

This example returns the key(s) of the asset object(s) for which the "OS Version" attribute is equal to the value "macOS Venture",e.g.:

ITSM-42

%{getAssetsFromAQL("object HAVING inboundReferences(key = " + %{issue.cf12566} + ")")}

This example returns the key(s) of the asset object(s) for which the incoming reference is the object from an asset object custom field with a single object, e.g.:

ITSM-39,ITSM-40,ITSM-41

Additional information

Parameters used in this function

ParameterInput (data type)Description
aql

TEXT

Text containing a valid AQL expression.

(warning) Double quotation marks in AQL have to be escaped with backslashes, e.g.:

Usually AQL would look like"OS Version" = "macOS Ventura"
Using it within getAssetsFromAQL()\"OS Version\" = \"macOS Ventura\"
Output

This function returns a TEXT LIST


Use cases and examples


If you still have questions, feel free to refer to our support team.