Conditions

Query Designer is divided into several sections - Common, Fields, Conditions, Default Values and Preview. This article provides detailed information about the Conditions section.

Overview

Under Conditions you can define a list of constraints and criteria to filter records in the result of the query.

Definition of Conditions in a query

You can either add an individual condition or a group (of conditions) to the list. Complex scenarios using multiple conditions and multiple groups are possible.

Add a Condition

To retrieve only data that adheres to certain criteria you add one or more conditions to your query. Click on Add condition at the top of the list to get started.

Adding conditions to filter records of a query

The newly created row the selection of a field from the available classes - Source and Query Context -, and how the field values should be evaluated against the comparison operator and an optional value.

The default type of a value is a Constant. More about value types in the next paragraph.

When you choose a logical comparison operator, e.g. Is empty then it is not necessary (and possible) to specify a value.

Edit a Condition

In the Actions columns you have the ability to Edit , Delete , and Position the selected row.

Click on the Edit icon to open a detailed view of the properties of the condition.

Review and edit properties of a condition

The Condition Properties view lets you choose a Field and how it compares to a certain constraint. Analogue to the Field selection in the list of conditions you can choose any entity from the available classes provided by Source and Query Context.

Next, you specify the comparison operator by choosing an option from the drop-down list. Ticking the Not checkbox negates the operation.

Comparison Operators

To compare your Field against a certain information you have to specify the comparison operator.

Choose a comparison operator to specify the condition to filter values

By default it is the is equal to operator =. The list of comparison operators is given below.

  • Is equal to =

  • Is not equal to <>

  • Is less than <

  • Is less than or equal to <=

  • Is greater than >

  • Is greater than or equal to >=

  • Begins with

  • Contains

  • Ends with

  • In

  • Is Null

  • Is Not Null

  • Is Empty

  • Is Not Empty

  • Is Null or Empty

The comparison operators describing a state of a field value, e.g. Is Empty, do not require a value to compare against.

Using a state-based comparison operator, here: `Not Null`

Types of Comparison

Then you select the type of value against which the field records should be compared to. The following types are available.

  • Constant

  • Expression

Each type has its individual detail to complete the condition.

Constant

A constant lets you define a fixed value against which the field values are compared to. A common scenario would be to check for non-negative numbers (e.g. greater than or equal zero) or whether a certain string is present (e.g. contains value).

Comparing records to multiple, constant values in a query

Enter multiple values as comma-separated list when using the In comparison operator.

Expression

An expression offers more flexibility compared to a constant and its value is evaluated during the execution of the query. Specify an expression by writing the reference in curly brackets, e.g. {CurrentUser.Id}.

Using an expression provides flexibility as the value is evaluated at execution of a query

A sample condition to display records which have been created by the current user only, you would select a field like Source.Created By and check whether its values are equal (=) to the current user, represented by the expression {CurrentUser.Id} .

Expressions are a feature of the Scripting capabilities of the platform. You can find out more about Expressions here.

Add a Group

Combining multiple conditions into a logical unit is called a group. You can define your list of conditions with any number of groups together with individual conditions. In logical terms, a group acts as a set of parentheses around your conditions.

Add a group of conditions to a query

The use of a group gives priority to a certain set of conditions in regards to the sequence of they are evaluated against the Source of your query. A group allows you define a more complex list of conditions, e.g. to filter records by certain constraint A but not following criteria B or C.

Logical Operators

When working with multiple conditions to filter your data you have to provide information of how those criteria are to be combined. Logical operators are used to link those conditions.

Combine multiple conditions with logical operators

Following operators are available to create more versatile conditions.

  • And - both criteria must be met to accept any value as result

  • Or - any criteria must be met to accept a value in the result

  • None - is a construct which stands for And Not when combining multiple criteria

Delete a Condition

To remove a single condition or a group from the list of conditions click on the Delete icon in the column Actions. Repeat to remove more than one row from the list.

Deleting a group removes all conditions inside that group.

Last updated

Was this helpful?