Use IQL in a report
Write the Filter, Properties, and Relationships fields of a report using the iGrafx Query Language (IQL) to control exactly which objects appear and what the report shows about them.
Prerequisites
- A report you can edit, open in the Reporting area or from the repository tree. See Create a report.
Steps
An IQL field is built from three kinds of element, joined with a period (.):
- A property is a value an object holds, such as
createDateor a custom property writtencustom:kpiCategory. - A relationship is a link to another object, such as
isDocumentedBy. - A type prefixes a built-in enumerated value, such as
ObjectType.PROCESS.
-
In the Filter field, enter an expression that selects the objects to include. Leaving the field empty selects every object in that dimension of the report. For example, to list only process objects:
type = ObjectType.PROCESS -
As you type, select values from the suggestions list. IQL is case-sensitive, and the suggestions insert the correct case for you.
-
Combine conditions with
AND,OR, andNOT, and group them with parentheses. To test one property against several values, useINrather than a chain ofORclauses — it runs faster. Separate the values with commas or spaces, and putNOTbeforeINto exclude them instead:type in (ObjectType.PROCESS, ObjectType.RESOURCE)type not in (ObjectType.PROCESS ObjectType.RESOURCE) -
Compare values with the operators IQL supports:
- Equality:
=and<> - Number and date comparison:
<,<=,>,>= - Substring match:
~, with?for a single character,*for any characters, and\to escape a wildcard - Non-existence: put
NOTbefore a property or relationship to match objects where no value exists
Write dates as
yyyy-mm-ddThh:mm:ss(the time is optional, on a 24-hour clock), or as an offset from now such as+-Ny/m/w/d/h. - Equality:
-
Count how many items a relationship or list property holds by wrapping it in
count(...). Compare the result like any number, or show it as a column. To total several relationships together, list them inside onecount(...), separated by commas or spaces:count(responsible) > 3count(responsible, accountable) >= 5count(...)works only with multi-valued properties — relationships such asresponsibleand list properties such asdiagramElement. It can't count a single-value property such asnameorcreateDate. -
In the Properties field (list and text-search reports) or the Relationships field (matrix reports), enter the elements to show, separated by commas or spaces.
-
Click Preview Report, or open the Report tab, to check the result.
Limitations
- A Boolean custom property has three states:
true,false, and not set. Compare to a value explicitly —custom:IsImportant = trueis not the same ascustom:IsImportant, which only tests whether the property exists. - IQL is case-sensitive. Use the suggestions list to keep element names correct.
Related
- IQL query types — the type prefixes and their enumerated values.
- IQL query properties — the properties you can filter on and show as columns.
- IQL query samples — worked examples for common reports.
- Create a report