The Query Tool

Adding Criteria
Click any of two Operators AND or OR to add a criterion. AND is selected by default, which is indicated by the arrow. When adding an OR criterion, the OR operator button needs to be pressed first to create a subquery within which an OR criterion can be added.
When adding a criterion you have five paths to choose from the menu
Attributes
The Algorithm that decides what Attributes to display works in the following way:
Simple Search Query
All attributes (regardless of existing actual instances of the definition) that are defined on given definition(s) and super classes in the search query. Only the class attributes is displayed if no definition or is a kind of is given. Example: Definition = A, Definition = A AND Definition = B (etc), Is a kind of = A, Is a kind of = A AND Is a kind of = B (etc), Definition = A AND Is a kind of = B (etc)
Complex Search Query
Only attributes that are defined on given definition(s) and super classes in the search query that actually have instances. Only the class attributes is displayed if no definition or is a kind of is given.
Example: Definition = A OR Definition = B (etc), Definition = A OR Is a kind of = B (etc)
References
Relations
The Algorithm that decides what Relations to display works in the following way:
Simple Search Query
All relations (regardless of existing instances to the relation) that are defined on given definition(s) and super classes in the search query.
Complex Search Query
Only relations that are defined on given definition(s) and super classes in the search query that actually have instances. Only the class attributes is displayed if no definition or is a kind of is given.
Parameters in Queries
To add a parameter to a criterion, press the parameter button next to the combo box.
This reveals the parameter window.
Name the parameter, select a data type and write an expression. Then press add Parameter to save it to the list.
Select the parameter from the list before closing the window to add it to your criterion. A parameter can be used multiple times in the same query.
More information about available parameters and expressions can be found in the documentation on Expressions.
Query Results
Press Run to return the units that matches the given Query. The table below returns the query results.
You can right click units in a query result to interact with them.
View and Edit Units
From the returned Query results you are able to open any unit to edit or view its usages, by double-clicking or right-clicking and choosing open/open in a new tab.
You are able to edit units definitions, relations and attributes (depending on the unit type) by making changes to the available entries for the unit.
Usages
Open Used X times to see where a unit is being used. This functionality allows you to effectively determine where changes made to the unit will apply.
Click any unit to open it in a new tab.
Usages analyze the following
Relations,
Subclasses and Implementing definitions,
Value references,
Query constants,
Value Set constants,
Applications constants, used in queries and specification of links between boxes,
Calls in methods (only methods)
Constant in OBJECT primitive ( all types).
Usages DOES NOT analyze
Expressions (Application variables, calculated columns, presentations, etc)
Instances
Constants in methods (only OBJECT primitive as stated above)
Gain Access to the Query tool
Users are by default prohibited to access the Query function from the Workbench. Consult a System Administrator of your instance if you require access.