Page History
...
Category | Function | Description |
---|---|---|
Logic | AND | Returns TRUE if all of its arguments are TRUE |
OR | Returns TRUE if any argument is TRUE | |
TRUE | Returns the boolean value TRUE | |
FALSE | Returns the boolean value FALSE | |
NOT | Reverses the boolean value of its argument | |
UNKNOWN | Returns the logical value unknown | |
Text | CONCATENATE | Joins several text items into one text item |
JOIN | Joins several text items into one text item, while placing a separator character between them | |
MATCH | Checks if a string completely matches a regular expression | |
FIND | Returns found characters if a pattern is found within text value | |
FIRST | Returns the first position where one text value is found within another | |
LAST | Returns the last position where one text value is found within another | |
Statistics | AVERAGE | Returns the average of its arguments |
MIN | Returns the minimum of a specified value in a list or collection | |
MAX | Returns the maximum of a specified value in a list or collection | |
COUNT | Counts the number of instances in a specified collection | |
Date and Time | DATETIME | Converts a date in the form of text or a date object to a dateTime object |
DATE | Converts a date in the form of text or a dateTime object to a date object | |
ADD PERIOD TO DATE | Adds a specified period (day, month etc.) to a date | |
ADD PERIOD TO DATETIME | Adds a specified period (day, month etc.) to a date | |
SUBTRACT PERIOD FROM DATE | Subtracts a specified period (day, month etc.) from a date and time | |
SUBTRACT PERIOD FROM DATETIME | Subtracts a specified period (day, month etc.) from a date and time | |
PERIOD BETWEEN | Returns the period (days, months etc.) between two dates, two dateTimes or a date-dateTime combination | |
YEAR | Returns the number of the year | |
MONTH | Returns the number of the month | |
DAY | Returns the number of the day in the month | |
HOUR | Returns the number of hours in a dateTime object | |
MINUTE | Returns the number of minutes in a dateTime object | |
SECOND | Returns the number of seconds in a dateTime object | |
TODAY | Returns today’s date | |
NOW | Returns the current date and time | |
Collection | SIZE collection | Returns the size of a collection |
UNIQUE collection | Filters duplicate instances in a collection | |
SUBSET OF | Returns a subset of a collection | |
UNION | Combines two collections into one new collection | |
INTERSECTION | Returns the intersection of two collections | |
Math | ADD | Adds two numbers |
SUM | Sums the specified values in a collection | |
SUBTRACT | Subtracts two numbers | |
DIVIDE | Divides two numbers | |
DIV | Returns the integer portion of a division | |
MOD | Returns the remainder from division | |
ROUND | Rounds a number to a specified number of digits | |
ROUND TO MULTIPLE | Rounds a number to the nearest integer or to the nearest multiple of significance | |
MULTIPLY | Multiplies two numbers | |
PRODUCT | Multiplies the specified values in a collection | |
POWER | Returns the result of a number raised to a power | |
LESS | Compares two number values and returns TRUE when one is smaller than the other | |
LESS OR EQUAL | Compares two number values and returns TRUE when one is equal or smaller than the other | |
GREATER | Compares two number values and returns TRUE when one is greater than the other | |
GREATER OR EQUAL | Compares two number values and returns TRUE when one is equal to or greater than the other | |
EQUAL | Compares two values and returns TRUE when they are equal | |
NOT EQUAL | Compares two number values and returns TRUE when they are not equal | |
List | EXISTS | Returns TRUE if there is an instance that matches the specifications |
ALL | Returns a collection of all instances of a specified entity | |
COLLECT FROM | Returns a collection for a specified entity | |
COLLECT FROM WHERE | Returns a collection for a specified entity that matches the specified conditions | |
COLLECT FROM NAMED | Returns a collection for a specified entity | |
COLLECT FROM NAMED WHERE | Returns a collection for a specified entity that matches the specified conditions | |
UNPACK | Returns the content of a single-valued list | |
Conversion | TEXT | Converts a value type to string |
INTEGER | Converts a value type to integer | |
NUMBER | Converts a value type to number | |
CURRENCY | Converts a value type to currency | |
PERCENTAGE | Converts a value type to percentage | |
DATE | Converts a value type to date | |
DATETIME | Converts a value type to datetime | |
BOOLEAN | Converts a value type to boolean | |
More functions | ISUNKNOWN | Replaces an unknown value with a specified value |
IS A | ||
TYPE OF | ||
AUTHORIZATIONROLES | ||
CHANNEL | ||
LANGUAGE | ||
PAGE | ||
PRIVILEGES | ||
EVENT |
Text
CONCATENATE
Use the '+' (plus) operator to concatenate strings or a combination of strings and other type values to produce a single string value.
Syntax
string1 + string2 + ... + value1 + ...
- string1 - The first string that you want to concatenate.
- string2 - The second string that you want to concatenate.
- value1 - A value of some type of number, date or boolean that you want to add to the new string value.
Return type
- string
Examples
...
JOIN
This function joins a series of values into one string, separated with a character of your choice.
Syntax
JOIN(argument1, argument2, ..., separator)
- argument1, argument2 - Attributes or expressions that contain the values that will be joint to a single string. JOIN works for all base types.
- separator - A string value that will be used as separator symbol.
Return type 1)
- string
Examples
Suppose a model containing the following 4 attributes.
...
...
MATCH
The MATCH function compares two strings and returns TRUE if they are exactly the same, FALSE if they are not. The MATCH function is case-sensitive.
Syntax
MATCH(string1,string2)
- string1, string2 - String values, attributes of base type string or expressions that result in a string value.
Return type
- boolean
Examples
If the attribute File.name is of base type string and its value is “Thisfile_1.doc” then
- MATCH(“Thisfile_1.doc”,File.name) results in TRUE
- MATCH(File.name,”Thisfile_1.doc”) results in TRUE
- MATCH(” Thisfile_1.doc”,File.name) results in FALSE
- MATCH(“thisfile_1.doc”,File.name) results in FALSE
FIND
The FIND function looks for one string pattern within another string and returns the first matching characters. The function is case-sensitive.
Syntax
FIND(pattern, attribute)
- pattern1) - An attribute of base type string or a string value. String must be a valid regular expression.
- attribute - An attribute of base type string or an expression that results in a string.
Return type
- string
Examples
If File.name is an attribute of base type string with value “Thisfile_1.doc”, then:
- FIND(“_[1-5]”, File.name) results in “_1”
- FIND(“File”, File.name) results in UNKNOWN
- FIND(“el”, “Hello”) results in “el”
- FIND(“eo”, “Hello”) results in UNKNOWN
FIRST
FIRST 2) returns the first character(s) of a string, based on the number of characters you specify.
Syntax
FIRST integer CHARACTERS OF string
FIRST CHARACTER OF string
- integer - A positive integer value. This can be either an attribute of base type integer, an expression that results in an integer or a constant integer value. FIRST CHARACTER OF can be used to retrieve only the first character of the string.
- string - An attribute of base type string, an expression that results in a string or a constant string value.
Return type
- string
Examples
If File.name is an attribute of base type string with value “Thisfile_1.doc” and the integer attribute File.prefix has value 8 then:
- FIRST File.prefix CHARACTERS OF File.name results in “Thisfile”
- FIRST CHARACTER OF File.name results in “T”
Example
- FIRST 2 CHARACTERS OF (LAST 6 CHARACTERS OF “pieceofcake”) results in “of”
- LAST 3 CHARACTERS OF (FIRST 4 CHARACTERS OF “what's in a name”) results in “hat”
LAST
LAST1) returns the last character(s) of a string, based on the number of characters you specify.
Syntax
LAST integer CHARACTERS OF string
LAST CHARACTER OF string
- integer - A positive integer value. This can be either an attribute of base type integer, an expression that results in an integer or a constant integer value. LAST CHARACTER OF can be used to retrieve only the last character of the string.
- string - An attribute of base type string, an expression that results in a string or a constant string value.
Return type
- string
Examples
If File.name is an attribute of base type string with value “Thisfile_1.doc” and the integer attribute File.extension has value 3 then:
- LAST File.extension CHARACTERS OF File.name results in “doc”
- LAST CHARACTER OF File.name results in “c”
Example
- FIRST 2 CHARACTERS OF (LAST 6 CHARACTERS OF “pieceofcake”) results in “of”
- LAST 3 CHARACTERS OF (FIRST 4 CHARACTERS OF “what's in a name”) results in “hat”
Statistics
AVERAGE
Use this function to determine the average (arithmetic mean) of a list or collection.
The AVG function has two syntax forms: the collection form and the list form. You can use the collection form to determine the average value of all occurances of an attribute. The list form is used to determine the average value of a set of different attributes.
Collection form syntax
AVG(attribute)
- attribute - An attribute of any type of number or date of which multiple instances can occur at runtime.
List form syntax
AVG([value1, value2, ...])
- [value1, value2, …] - A list of attributes, expressions or fixed values of any type of number or date. Use the square brackets to indicate that the arguments form a list of values.
Return types
- number
- integer
- currency
- percentage
- date
The function returns UNKNOWN if one or more values are UNKNOWN.
Examples
Suppose the following domain model.
Entity.attribute | Multivalued relation | Entity.attribute |
---|---|---|
Residence.appraisalValue Residence.askingPrice Residence.mortgage | hasBiddings | Bidding.amount |
If you want to determine the average bidding on the current residence:
- AVG(Residence.hasBiddings.amount)
If you want to determine the average amount of the appraisal value, the asking price and the mortgage of the current residence:
- AVG([Residence.appraisalValue, Residence.askingPrice, Residence.mortgage])
...