Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

CategoryFunctionDescription
LogicANDReturns TRUE if all of its arguments are TRUE
ORReturns TRUE if any argument is TRUE
TRUEReturns the boolean value TRUE
FALSEReturns the boolean value FALSE
NOTReverses the boolean value of its argument
UNKNOWNReturns the logical value unknown
TextCONCATENATEJoins several text items into one text item
JOINJoins several text items into one text item, while placing a separator character between them
MATCHChecks if a string completely matches a regular expression
FINDReturns found characters if a pattern is found within text value
FIRSTReturns the first position where one text value is found within another
LASTReturns the last position where one text value is found within another
StatisticsAVERAGEReturns the average of its arguments
MINReturns the minimum of a specified value in a list or collection
MAXReturns the maximum of a specified value in a list or collection
COUNTCounts the number of instances in a specified collection
Date and TimeDATETIMEConverts a date in the form of text or a date object to a dateTime object
DATEConverts a date in the form of text or a dateTime object to a date object
ADD PERIOD TO DATEAdds a specified period (day, month etc.) to a date
ADD PERIOD TO DATETIMEAdds a specified period (day, month etc.) to a date
SUBTRACT PERIOD FROM DATESubtracts a specified period (day, month etc.) from a date and time
SUBTRACT PERIOD FROM DATETIMESubtracts a specified period (day, month etc.) from a date and time
PERIOD BETWEENReturns the period (days, months etc.) between two dates, two dateTimes or a date-dateTime combination
YEARReturns the number of the year
MONTHReturns the number of the month
DAYReturns the number of the day in the month
HOURReturns the number of hours in a dateTime object
MINUTEReturns the number of minutes in a dateTime object
SECONDReturns the number of seconds in a dateTime object
TODAYReturns today’s date
NOWReturns the current date and time
CollectionSIZE collectionReturns the size of a collection
UNIQUE collectionFilters duplicate instances in a collection
SUBSET OFReturns a subset of a collection
UNIONCombines two collections into one new collection
INTERSECTIONReturns the intersection of two collections
MathADDAdds two numbers
SUMSums the specified values in a collection
SUBTRACTSubtracts two numbers
DIVIDEDivides two numbers
DIVReturns the integer portion of a division
MODReturns the remainder from division
ROUNDRounds a number to a specified number of digits
ROUND TO MULTIPLERounds a number to the nearest integer or to the nearest multiple of significance
MULTIPLYMultiplies two numbers
PRODUCTMultiplies the specified values in a collection
POWERReturns the result of a number raised to a power
LESSCompares two number values and returns TRUE when one is smaller than the other
LESS OR EQUALCompares two number values and returns TRUE when one is equal or smaller than the other
GREATERCompares two number values and returns TRUE when one is greater than the other
GREATER OR EQUALCompares two number values and returns TRUE when one is equal to or greater than the other
EQUALCompares two values and returns TRUE when they are equal
NOT EQUALCompares two number values and returns TRUE when they are not equal
ListEXISTSReturns TRUE if there is an instance that matches the specifications
ALLReturns a collection of all instances of a specified entity
COLLECT FROMReturns a collection for a specified entity
COLLECT FROM WHEREReturns a collection for a specified entity that matches the specified conditions
COLLECT FROM NAMEDReturns a collection for a specified entity
COLLECT FROM NAMED WHEREReturns a collection for a specified entity that matches the specified conditions
UNPACKReturns the content of a single-valued list
ConversionTEXTConverts a value type to string
INTEGERConverts a value type to integer
NUMBERConverts a value type to number
CURRENCYConverts a value type to currency
PERCENTAGEConverts a value type to percentage
DATEConverts a value type to date
DATETIMEConverts a value type to datetime
BOOLEANConverts a value type to boolean
More functionsISUNKNOWNReplaces 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.

 

...

 

 

...

 

1) an UNKNOWN value will be represented as an empty entry in the result string.

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”
1) The regular expressions used in several Aquima Studio functions are common Java 1.4 expressions. For a complete documentation we refer to the online java documentation.
2) use a combination of FIRST and LAST to retrieve a subset from inside a string.

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.attributeMultivalued relationEntity.attribute
Residence.appraisalValue  Residence.askingPrice  Residence.mortgagehasBiddingsBidding.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])

...