Query Expressions are global functions that can be used to resolve organizations dynamically in organization based functions such as AGG, AGGAVG, INDEX and TOP functions.
The Query expression performs a search based on the current organization or another element you select.
Query expressions are created in Expressions in the View menu or under Structure in the Window menu. They are store in Categories, so you must create at least one category before you can create a Query expression.
To create a Query expression, right click a Category in the Expression panel and choose Add -> Expression -> Query expression.
General
Name - the name "Query expression" is generated automatically but it may be changed.
Description - an optional text describing the expressions
Filter
Create a set of conditions that define what you are looking for and where to look by selecting from the drop-downs in this section.
Select from - the starting point for the search
Current organization - search in the current organization
Element list - select from the list of available elements; more than one may be selected
Now, create rules that define the conditions that are to be met. This is done by selecting the desired properties, operations and values from the drop-down lists, e.g. Name contains "school"
Specify:
Any - an object must meet only one of the rules in a set
All - an object must meet all of the rules in a set
None - an object must not meet any of the rules in a set
All sub-organizations are always included when 'Current organization' is selected and no conditions are defined. Filters should therefore always be used to make the Query expression return only one level. If the query finds more than one level, organization entries may be duplicated in drills and have consequences such as department values being calculated multiple times as multiple levels of organizations will be included and the AGG function will then calculate the depth of all of those.
Example:
If you have a structure like:
District
School
Department
and you only want to see the schools, then the filter must only include the schools.
You can use custom properties to filter on properties. Referring to the example above, you can create a text property on organizations
and give it the value "District", "School", or "Department" respectively. Then, to select all schools, define the Filtered list condition Text property contains "School".
Use * and + in the function where Query expressions are used to include sub levels of organizations.
Example:
This function is used:
agg('[100]',{100})
If schools are returned in Query expression 100, then only values for the schools are used in the function.
agg('[100]',*{100})
will also include values for departments
agg('
[100]',+{100})
will show the schools but only include the values for departments
To create an additional rule in a set click Add new rule.
To create another rule set click Add new rule set.
Audit
Modified by - the name of the last user to make changes to the object.
Last modified - the date and time when the object was last changed.
Created by - the name of the user who created the object.
Created - the date and time when the object was created.
ID
ID - a unique ID for the object.
By
default, Corporater BMP assigns consecutive numbers to new objects.
You can change the ID to a value of choice that can include either letters or letter and number combinations.
The ID mustn't contain only numbers, include special characters such as ) ( . * } { + < > [ ], or match the name of a default object type in Corporater BMP.
Access control
Read accessors - click the Edit button () and authorize one or more users and user groups to view the object on Web.
Add accessors - click the Edit button() and authorize one or more users and user groups to add new objects to the object on Web.
Write accessors - click the Edit button() and authorize one or more users and user groups to edit the object on Web.
Delete accessors - click the Edit button() and authorize one or more users and user groups to delete the object on Web.
Ownership - click the Edit button () and grant ownership of the object to one or more users and user groups.
Users and user groups who own the object have full access rights to it.
Override access profile - select for the object's access control setting to outrank the object's corresponding access settings in profiles.
To preview the result of a Query expression based on its current configuration, select it from the Business Management Platform model,
select the Preview tab, and then click the Refresh button ().
The Result subtab displays result values and their applicable range for each function in the expression.
To view a report on the calculations behind the expression, select the Profile tab.
Version 5.1.2.0
This document contains confidential information. Not to be copied by third parties without written authorization.
© Copyright Corporater AS - All rights reserved.