Skip to main content

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 createDate or a custom property written custom:kpiCategory.
  • A relationship is a link to another object, such as isDocumentedBy.
  • A type prefixes a built-in enumerated value, such as ObjectType.PROCESS.
  1. 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
  2. As you type, select values from the suggestions list. IQL is case-sensitive, and the suggestions insert the correct case for you.

  3. Combine conditions with AND, OR, and NOT, and group them with parentheses. To test one property against several values, use IN rather than a chain of OR clauses — it runs faster. Separate the values with commas or spaces, and put NOT before IN to exclude them instead:

    type in (ObjectType.PROCESS, ObjectType.RESOURCE)
    type not in (ObjectType.PROCESS ObjectType.RESOURCE)
  4. 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 NOT before 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.

  5. 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 one count(...), separated by commas or spaces:

    count(responsible) > 3
    count(responsible, accountable) >= 5

    count(...) works only with multi-valued properties — relationships such as responsible and list properties such as diagramElement. It can't count a single-value property such as name or createDate.

  6. 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.

  7. 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 = true is not the same as custom:IsImportant, which only tests whether the property exists.
  • IQL is case-sensitive. Use the suggestions list to keep element names correct.