Query definition

A query definition consists of a unique query name and a sequence of conditions which describes the process to create the result set. Each condition consists of these elements:
  • Operation
  • Filter condition
    • Field name
      • Class field
      • Bucket field
    • Comparison
    • Value

Operation

The operation defines the process to apply the condition filter to the query results. Possible values:

  • ADD: Adds the results of the condition filter to the existing query results.
  • LIMIT: Applies the condition filter to the current query results.
  • RESET: Replaces current query results with the condition filter results.

Field name

The field name defines the type of condition filter to be applied. Possible types:

  • Class condition filter
  • Bucket condition filter

Class condition filter

A Class condition filter is applied to resources of a specified class. This table lists the field names for class condition filter:
Field name Description Example
Class name.attribute name Applies condition filter to the values of attribute with name (Attribute name) and for resources of class (Class name). Products.Item Type
Class name.property name Applies condition filter to the values of property with name (Property name) and for resources of class (Class name), for the filtered buckets. Products.lost sales
_Class name.default property name (*)_ Applies condition filter to the values of default property with name (_default property name (*)_) and for resources of class (Class name). Products.units per transport unit (*)
Class name.Related Class name.number of relations Applies condition filter to the number of related resources of class (Related Class name) and for resources of class (Class name). Processes.Resource Allocations.number of relations
Note: If bucket condition filters are not applied on properties before class condition filters, the property filter is applicable to the entire planning horizon.

Bucket condition filter

A bucket condition filter is applied to buckets in the calendar. The purpose of bucket conditions is to filter the buckets for which the class condition filters are applied on properties.

This table lists the field names for bucket condition filter:

Field Name Description
bucket.name Applies condition filter on name of buckets.
bucket.start Applies condition filter on start date of buckets.
bucket.end Applies condition filter on end date of buckets.

Comparison

Comparison is applied between the value of the Condition field and the condition value.

This table lists the comparisons that can be used:

Comparison Description
> Greater than
>= Greater than or equal to
< Less than
<= Less than or equal to
= Equals
!= Not equals
~ Contains string value
!~ Does not contain string value

Value

This table lists the type of value to which the comparison is applied to the field value:

Value Description Example
string literal String value Product A
numeric literal Numerical value 10.5
date literal Date value in form DD-MM-YYYY 31-12-2018
$ variable_name Value of variable with name (variable_name) $minimum_allowed
%nil Empty property value %nil