EQL Editor
EQL editor is a distinct view used to edit Efecte Query Language (EQL) commands. EQL is a query language similar to SQL used in traditional relational databases. With the help of EQL editor, editing EQL queries is possible without deep knowledge of the inner workings of the language and its notations.
Using the EQL Editor
The specific outlook and fields of the EQL editor can vary some, depending on the functionality it is used to parametrize, but it also has some common fields. The fields specific to certain functionalities are explained in their respective documents, while the common fields are explained here. Below is a picture of what the EQL editor looks like when configuring a related data card search. The common fields for all functionalities that use the EQL editor are target template, search bindings, and sort.
The #target# macro is specific to related search handler. #referrer# macro should be used in other cases.
Editing the search criteria

Target template is essential, if the reference attribute can refer to multiple templates and the search results are filtered by different attributes of the target templates. If all referred templates contain attributes with same codes, this value can be set as All. The All value can be used also when the attribute refers to one template only.
Search bindings consist of three components: left hand side variable, search operator and right hand side variable. Left hand variable side refers to target template and right hand side variable refers to source template. Both the variables can be attribute values of referrer data card, values of potential referred data cards, macros or defined constants.
Attribute codes and macros are differentiated by different markers. Attribute codes of target templates are surrounded by $ characters, and other macros, including referrer, are surrounded by # characters.
Sort setting enables sorting the search results by values of attributes. If there are multiple Order by lines, they will be applied in the given order to search results. This means that if there are multiple results for the first setting, that group will be sorted by the second setting.
Check more examples at end of the document.
Table 1. Macros and Data Card Values
The following table provides information on the macros that can be used as variables.
| Name | Description |
|---|---|
$attributeCode1:attributeCode2:..:attributeCodeN$ |
Values of attributes of target (referred) templates can be used as conditions by using attribute codes surrounded by $ characters and separated by : character if values are retrieved from references. |
|
|
The #target# macro can be used in a related search to point to a selected value of a multivalue reference. |
|
|
The Values of attributes of source ( |
|
|
Macros starting with "any" can be used as a filter for any attribute of the specific data type of target template. For example, #anystring# searches values of all string attributes of a target template. #anyattribute# is similar to normal reference search or quick search. |
now |
The now keyword can be used as right hand side operator for date attributes. After the keyword there can be a - or + character, a number, and a time unit (e.g., m for month, h for hour, d for day). For example, a value may be now+2d (two days after current date). |
|
|
User macros can be used as right hand side variable. #userId# is replaced with user id of current user. #userName# is replaced with the name of current user's datacard (fallbacks to user id). #user# is replaced with a reference to current user's datacard. #user:code:code# is replaced with the value of a field of current user's datacard. |
Table 2. Search Operators
The following table provides information on the search operators that can be used in EQL commands.
| Name | Description |
|---|---|
= |
Equal. |
!= |
Not equal. |
like |
Like, * as wild card. |
not like |
Not like, * as wild card. |
>= |
Is equal or greater. |
> |
Is greater. |
<= |
Equal or less than. |
< |
Less than. |
in |
Value is in defined list, items separated by ; (semicolon). In EQL values will be like ('option 1','option 2'). |
not in |
Value is not in defined list, items separated by ; (semicolon). |
between |
Value is between two values. In editor low and high values are separated by ; (semicolon) (i.e., lo;hi). In EQL the values will be like 'lo' and ‘hi’ |
not between |
Value is not between two values, low and high values are separated by ; (semicolon). |
is null |
Value does not exist i.e. data card must not contain any value for given attribute. |
is not null |
Value does exist i.e. data card must contain any value for the given attribute. |
It is usually a good idea to add a search condition deleted = 0 and hidden = 0, otherwise the search results will include data cards in trash can and hidden data cards.
Table 3. EQL Examples
The following table provides a selection of EQL sample conditions.
| Name | Description |
|---|---|
$computer_loc$ = #referrer:location#
|
Value of target cards' $computer_loc$ attribute must match with current data cards $location$ attribute |
$invoicing_date$ = now+1d |
Value of $invoicing_date$ attribute must be tomorrow |
#anydate# = now |
Any date attribute must have value indicating current date |
$comp_price$ between 200;300 |
Value of Note: in EQL this will be shown as |
$comp_loc$ in Room a; Room b |
Value of Note: in EQL this will be shown as |
folder.idCode = ‘ExampleCode’ |
The value of the folder code property should be equal to ‘ExampleCode’
|
Table of Contents