The Query Tool
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
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)
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
Parameters are used to set up query statements that should be configurable. This is useful for statements that continuously change, or that are to be configurable outside of the Knowledge Set Builder, like the API.
A good example is to create a parameter with the variable @NOW, which returns always returns the current date and time, this allows us to set up queries that always use the current date, rather than a fixed one in a query. Another example is to let users change the content of a column by setting another defining unit over the API. We can use then use the knowledge set as a foundation for interactive, custom built solutions for the end users.
Add and edit parameters through the input field in a query
When creating a parameter we are required to make the following entries
|Parameter||The name of the parameter|
|Data Type||The class of the parameter. Notice that we need a class that maches the statement. If a parameter is used for an attribute with the given class Integer, The parameter must be of the same class.|
|Default Expression||The expression that is executed when the query is run.|
Applicable parameters (those who matches the class of the statement) is available for selection from the menu within a query.
Examples of use
1. Use a Parameter to return the Initiatives that launched less than a month ago
This Query contains Business Improvement Initiatives and their start and end dates. By adding a statement for the From Date attribute in Time Period we are able to say that:
The From Date is larger than…
and then add a parameter that returns the date one month ago from today.
The Query will now always return Initiatives where the From Date is larger than A month ago, no matter when it is being run.
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.
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
Subclasses and Implementing definitions,
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)
Constants in methods (only OBJECT primitive as stated above)