Help ELMA BPM Platform
×
Menu

Functions

Functions can be divided into user and system functions.

User Functions

There are two types of user functions:
The following functions pertain to the QueryFunctionResult type:
    Now – current date and time;
   Today – the current date and time as <dd:mm:yy>, (00:00:00);
    MinValue – minimum allowed value of the "Date/Time" type variable;
    MaxValue  maximum allowed value of the "Date/Time" type variable.
CreationDate <= DateTime(2014, 12, 17, 11, 15) search contractors, whose creation date is less than or equal to 17.12.2014, 11:15.
Uid = Guid('27E70DFE-2A76-4F1D-A99A-CDF31C62D618') – search contractors with the specified ID.
TypeUid = TypeReference('ContractorLegal') – search all the companies.
DrawnUpContract = Reference('298b2c71-619f-463c-95b2-8e029085680d', 15) – search replies to the question by the specified IDs.
ListOfBranchOffices = DropDownItem('Frankfurt Office') – search by the specified branch office.
Interval > WorkTime(1, 0, 00) – search all the objects, for which the interval of more than 1 business day is specified.
The following functions pertain to the QueryInFunction type:
CreationAuthor IN (CurrentUser(), 2) - search contractors, created by the current user or by the user with ID=2.
Contacts IN (Priority IN (Enum('High'), Enum('Low'))) – search contractors whose contacts have high and low priority.
RelativeDateTime('relative period start date', 'relative period end date') - time interval between relative dates. One of the parameters can be empty. In this case, the parameter is set with empty single quotes and the NULL value.
If the first parameter (period start date) is empty, then the time interval will start from minus infinity (minimum allowed value) until the second parameter (period end). If the second parameter (period end date) is empty, then the time interval will start from the first parameter (period start date) until the current date:
CreationDate IN RelativeDateTime('-1m', '-1m') search all the contractors, created last month.
TypeUid in SubTypes('ContractorIndividual') search all the individuals.
Responsible in GetChiefByUser(1) search contractors, for which the superiors of the user with ID=1 are responsible.
Responsible in GetUserSubordinate(101) search all the contractors, for which the subordinates of the user with ID=101 are responsible.
Responsible in GroupUsers(109) search all the contractors, for which the members of the group with ID=109 are responsible.
Id in UserGroups(102) search all the user groups, whose member is the user with ID=102.
CreationAuthor in (FROM User SELECT Id WHERE OrganizationItems in UserOrganisationItems(1)) – search all the contractors, created by the user, who occupies a certain job position (with id=1).

System Functions

COUNT() – function for writing complex subqueries, whose result is an integer. System function rules:
     property is a list-type field.
COUNT(Contacts) > 0 – search contractors, which have contacts.
     FROM entity WHERE expressionwhere:
     entity – is an object the subquery works with;
      expression – is an expression for filtering the object instances; can also be a subquery.
COUNT(FROM Contact WHERE NOT Skype IS NULL AND Contractor = PARENT.Id) >= 1 – search contractors, which have at least one contact, with the condition that the Skype field of the contacts is filled in and the contractor's contact matches the searched one.
COUNT(GroupUsers(1)) – number of users in the group with ID=1.
To learn more about working with the EQL language, see this knowledge base article.

Copyright © 2006–2019 ELMA