Functions
Rules > Rules manager > Rule items > Set actions > Functions
Function | Description | Formula type | Notes and examples |
---|---|---|---|
abs |
Returns the absolute value of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
acos |
Returns the inverse cosine of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
acosh |
Returns the inverse hyperbolic cosine of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
asin |
Returns the inverse sine of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
asinh |
Returns the inverse hyperbolic sine of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
atan |
Returns the inverse tangent of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
atanh |
Returns the inverse hyperbolic tangent of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
avg |
Returns the average of any number of parameters, which may be Number fields and/or constant numbers, i.e., |
Numeric |
Example: |
avgFields |
For related tables only. Returns to a Number field of a parent table the average based on a Number field (param2) placed in the records of a table with relation (param1) to the parent table, i.e., Target: Parent table Trigger: Child table or Parent table Criteria: Any Action: This function can optionally be used with up to six parameters: - param3 and param4 together work as lower and upper bound filter condition; i.e., - param5 and param6 together work as a specific filter condition, using a field reference (Text, Date, Number, Checkbox or Drop-down) and its value; i.e., |
Numeric |
Example 1: Order A. Suborder total average=4 Suborder A1. Suborder total=5 Suborder A2. Suborder total=3 Example 2, using param3 and param4: Example 3, using param5 and param6: Also note that Text, Date, Number and Checkbox fields can be used as param5, while param6 can be typed, for example, as "Approved", parseDate("2013/06/13"), 550, 1, respectively. Example 4, using all 6 parameters: |
ceil |
The ceiling function returns a number rounded up to the next full integer (e.g., 10.1 → 11) of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
clearField |
Clears the field value of the field supplied in param1, which may be any type of field except for Drop-down. Returns 1 for success or 0 for failure (that can be targeted to a Number or Checkbox field), i.e., |
Numeric |
It is recommended that the target field (where the result of the formula, i.e, 1 or 0, will be set) is a Checkbox created only for this purpose. Such a Checkbox does not need to be shown in forms, to avoid confusion to users. Example: It is very useful to have this function as nested as well (see example of match function). Note: Another way to clear a field is to simply type the constant |
Returns to a Text or Note field a string of param1 concatenated with param2, param3, etc., which may be fields of any type and/or strings entered within quotation marks, i.e., |
Text/Note |
Example 1: Important note: Concatenated values that exceed the maximum length of the destination Text/Note field will be truncated. Example 2: use this function to customize the Record name, e.g., concatenate the Customer ID plus a consecutive number, like "ACME-1001":
|
|
cos |
Returns the cosine of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
cosh |
Returns the hyperbolic cosine of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
countFields |
For related tables only. Returns to a Number field of a parent table the total count of a specific non-empty field (param2) placed in the records of a table with relation (param1) to the parent table, i.e., Target: Parent table Trigger: Child table or Parent table Criteria: Any Action: This function can optionally be used with up to six parameters: -param3, as standalone, is interpreted as a filter condition made on param2; e.g., -param3 and param4 together work as lower and upper bound filter condition; e.g., -param5 and param6 together work as a specific filter condition, using a field reference (Text, Date, Number, Checkbox or Drop-down) and its value; e.g., |
Numeric |
Example 1: Order A. Number of suborders completed=1 Suborder A1. Suborder completed=True Suborder A2. Suborder completed=False Note: If is also very common to use this function to count the total records that depends on a main one, e.g., Example 2, using param3: Example 3, using param3 and param4: Example 4, using param5 and param6: Also note that Text, Date, Number and Checkbox fields can be used as param5, while param6 can be typed, for example, as "Approved", parseDate("2013/06/13"), 550, 1, respectively. Example 5, using all 6 parameters: |
currentDate |
Returns to a Date field today’s date. No parameter is needed. |
Numeric |
See an example in the getDays function. |
currentDateTime |
Returns to a Date Time field today’s date and time. No parameter is needed. |
Numeric |
|
dayOfMonth |
Returns the day of the month of a Date, Date Time or strings in param1, i.e., |
Usually Numeric, but it can also be Text/Note |
|
decimals |
Rounds the Number field in param1 to the number of decimals in param2, e.g., |
Numeric |
Example: |
exp |
Returns the exponential of param1, which may be a Number field or a constant number, i.e., exp(NumberField) or exp(500), respectively. |
Numeric |
|
fieldCreated |
Returns the date when the field content was created. Param1 is the ID of the field, and must be given as a reference, i.e., fieldCreated(REF(AnyTypeOfField)). Note: No Date will be shown for deleted data. |
Usually Numeric, but it can also be Text/Note |
Usually the target field is a Date. But if the resulting value is desired to be stored in a Text or Note field, then this function must be nested in a toDateString function. Example: |
fieldCreator |
Returns USERNAME or USERID of field content creator. Param1 is the ID of the field, and must be given as a reference, REF(). Param2 can be "1" or "0", where 1 displays the USERID and 0 displays the USERNAME, i.e., Note: No information is returned for deleted data. |
Text/Note |
Example: |
fieldCreatorEmail |
Returns email address of field content creator, or an empty string if missing. Param1 is the ID of the field, and must be given as a reference, i.e., |
Text/Note |
|
fieldCreatorName |
Returns full name of field content creator. Param1 is the ID of the field, and must be given as a reference. Param2 can be 1 or 0, where 1 displays the last name first (Smith, John) and 0 displays the first name first (John Smith). |
Text/Note |
Example: |
fieldUpdated |
Returns the date when the field content was updated. Param1 is the ID of the field, and must be given as a reference, REF().No information is returned for deleted data. |
Numeric |
|
fieldUpdator |
Returns USERNAME or USERID of field content update performer. Param1 is the ID of the field, and must be given as a reference, REF(). If param2 is given as "true" or "1", USERID is returned. Otherwise USERNAME is returned. No information is returned for deleted data. |
Text/Note |
See an example of the parameters in the fieldCreator function. |
fieldUpdatorEmail |
Returns email address of field content update performer, or an empty string if missing. Param1 is the ID of the field, and must be given as a reference, REF().No information is returned for deleted data. |
Text/Note |
|
fieldUpdatorName |
Returns full name of field content update performer. Param1 is the field ID of the field, and must be given as a reference, REF(). If param2 is given as ‘true’ or 1, the last name is displayed first (Smith, John). Otherwise the first name is displayed first (John Smith). No information is returned for deleted data. |
Text/Note |
|
floor |
Returns the largest integer not greater than param1 (e.g., 10.1 → 10), which may be a Number field or a constant number, i.e., |
Numeric |
|
formLink |
Returns to a Text or Note field, the link string (the URL) of a Form specified as a reference (REF()) in param1, i.e., Note: Form IDs can be found as fields in the Field drop-down of the Formula editor. The chosen form must have the same main table as the current Trigger table of the rule. |
Text/Note |
Example: |
getDays |
Returns the number of days of param1, which must be a Date field or a substraction of Dates, i.e., |
Numeric |
Example: Note that the substraction of dates can also be done without this function: |
getMobilePhone |
Returns the mobile phone number of the user (registered in User administration) with the username or userId supplied in param1. If no such user exists, it returns an empty string (""). |
Text/Note |
Examples:
|
getRecordGroup |
Returns the name or Id (depending on if Formula type is Text/Note or Numeric, respectively) of the group the record in param1 belongs to. Param1 can be: - A constant value (i.e., the record name or record Id), e.g., - A variable value (i.e., the Relation field pointing to the Parent record), e.g., where Param2 is only needed for Text/Note and is the Table Id* of the record named by Param1. For Numeric type, Param2 can be set to null or notused. |
Usually Text/Note, but it can also be Numeric. |
Mostly used in combination with the function Example: For this, it is recommended that the target field (where the result of the formula, i.e, 1 or 0, will be set) is a Checkbox created only for this purpose. Such a Checkbox does not need to be shown in forms, to avoid confusion to users. This way, if the rule’s criteria is fulfilled, then the record will be moved to the parent’s group and the "Dummy Checkbox" will be automatically ticked. Read more in the moveToRecordGroup function’s notes. If the function is used alone: Example: *Table Id can be obtained from the URL of Open table records icon in Data model editor (looks like istools/apps/2063/forms/magical/2?view=window, where the number before "?" is the Table Id. Note: The result of using this function with an invalid input will be 0. |
getRecordName |
Returns to a Text or Note field the name of the target record. No parameter is needed. In case the Record name is a number, this function must be converted to a string, i.e., |
Text/Note |
|
getFieldLabel |
Returns to a Text or Note field the name of the field in parameter1, i.e., |
Text/Note |
|
getUserEmail |
Returns to a Text or Note field the email address of the user with username supplied in param1 within quotation marks, e.g., |
Text/Note |
|
hasRole |
Checks whether the user executing the function has the role mentioned in param1, within quotation marks. e.g., |
Numeric |
If this function is used alone, it is recommended that the target field (where the result of the formula, i.e, 1 or 0, will be set) is a Checkbox created only for this purpose. Such a Checkbox does not need to be shown in forms, to avoid confusion to users. Based on the example above, if the rule’s criteria is fulfilled and the user doing so has the "MANAGER" role, then the "Dummy Checkbox" will be automatically ticked (set to 1). But if this function is used as nested in other function, it can be very useful and no need of a Checkbox is required. Example: |
hasValue |
Checks whether the field with field id param1 has a value assigned to it, returns 1 if a value exists, 0 otherwise. Param1 must be a reference to a field, REF(), e.g., |
Any |
Example: |
hour |
Returns the hour of the day (24 hours) of a Date, Date time or strings in param1. |
Usually Numeric, but it can also be Text/Note |
|
if |
Returns the value of param2 only if param1 is positive, otherwise returns the value of param3, i.e., Optionally, other functions can be nested. Remember that both the rule’s criteria and the first parameter need to be fulfilled in order to return a result. |
Any, depending on the type of target field. |
Example 1: Note: In case no action is wished, i.e, no value needs to be returned by the formula, the constant IGNORE can be typed as the proper parameter in the formula box. For instance, Example 2: |
isLeapYear |
Returns 1/True if the year represented by param1 (Date or Date time) is a Leap year; otherwise returns 0/False. |
Any, depending on the type of target field. |
Example 1: Example 2: Example 3: Example 4: |
lastFieldModifiedDate |
Returns the latest date upon which the data of the field in param1 was modified, i.e., Note: No Date will be shown for deleted data. |
Usually Numeric, but it can also be Text/Note. |
Usually the target field is a Date. But if the resulting value is desired to be stored in a Text or Note field, then this function must be nested in a toDateString function. Example: |
lastFieldModifiedName |
Returns the name of the last user who modified the field in param1. Param2 can be 1 or 0, where 1 displays the user’s last name first (Smith, John) and 0 displays it as normal (John Smith), i.e., lastFieldModifiedName(AnyTypeOfField, 1). Note: No name will be shown for deleted data. |
Text/Note |
Example: |
lastFieldModifiedUserName |
Returns the username of the last user who modified the field in param1, i.e., Note: No username will be shown for deleted data. |
Text/Note |
|
lastRecordModifiedDate |
Returns the latest date upon which the data of the record was modified. No parameter is needed. |
Usually Numeric, but it can also be Text/Note. |
Usually the target field is a Date. But if the resulting value is desired to be stored in a Text or Note field, then this function must be nested in a toDateString function. Example: |
lastRecordModifiedName |
Returns the name of the last user who modified the target record. Param1 can be 1 or 0, where 1 displays the user’s last name first (Smith, John) and 0 displays it as normal (John Smith), e.g., |
Text/Note |
|
lastRecordModifiedUserName |
Returns the username of the last user who modified the target record. No parameter is needed. |
Text/Note |
|
length |
Returns the number of characters of param1, i.e., |
Numeric |
|
ln |
Returns the natural logarithm of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
log |
Returns the common logarithm of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
match |
Checks if the string in param1 matches the regular expression pattern in param2, i.e., Optionally, this function can be nested. Remember that both the rule’s criteria and the match function need to be fulfilled in order to return a result. Returns 1 if match is found, else 0. |
Text/Note |
In this case, the Formula type must be Text/Note, due to the regular expression, even if the target field is a Checkbox or a Number. Regular expressions can be obtained at regular-expressions.info and quotation marks must be used to enter them in the formula. This function is rarely used alone, but if that is the case, it is recommended that the target field (where the result of the formula, i.e, 1 or 0, will be set) is a Checkbox created only for this purpose. Such a Checkbox does not need to be shown in forms, to avoid confusion to users. Example 1: Also, this function can be very useful if it’s used as nested in other function. Example 2: |
max |
Returns the maximum value of a variable number of parameters, i.e., the largest of those values (usually Number or Dates fields), |
Numeric |
|
maxFields |
For related tables only. Returns to a Number field of a parent table the maximum value of a field (param2, usually Number or Date fields) placed in the records of a table with relation (param1) to the parent table, i.e., Target: Parent table Trigger: Child table or Parent table Criteria: Any Action: This function can optionally be used with up to six parameters: -param3 and param4 together work as lower and upper bound filter condition; e.g., -param5 and param6 together work as a specific filter condition, using a field reference (Text, Date, Number, Checkbox or Drop-down) and its value; e.g., |
Numeric |
Example 1: Order A. Maximum amount in Suborders=150 Suborder A1. Suborder total=150 Suborder A2. Suborder total=120 Example 2, using param5 and param6: Also note that Text, Date, Number and Checkbox fields can be used as param5, while param6 can be typed, for example, as "Approved", parseDate("2013/06/13"), 550, 1, respectively. To set a null value as param6, use the keyword null or 0. |
median |
Returns the median of a variable number of parameters, usually Number or Dates fields, |
Numeric |
|
medianFields |
For related tables only. Returns to a Number field of a parent table the median value of a field (param2, usually Number or Date fields) placed in the records of a table with relation (param1) to the parent table, i.e., Target: Parent table Trigger: Child table or Parent table Criteria: Any Action: |
Numeric |
Example: Suborder A1. Suborder total=2 Suborder A2. Suborder total=10 Suborder A3. Suborder total=8 |
min |
Returns the minimum value of a variable number of parameters, i.e., the smallest of those values (usually Number or Dates fields), |
Numeric |
|
minFields |
For related tables only. Returns to a Number field of a parent table the minimum value of a field (param2, usually Number or Date fields) placed in the records of a table with relation (param1) to the parent table, i.e., Target: Parent table Trigger: Child table or Parent table Criteria: Any Action: This function can optionally be used with up to six parameters: -param3 and param4 together work as lower and upper bound filter condition; e.g., minFields(REF(MyChildRelationField), REF(MyChildNumberField), 1, 5), meaning that only those records having the field "MyChildNumberField" with value between 1 and 5 will to be taken into account. -param5 and param6 together work as a specific filter condition, using a field reference (Text, Date, Number, Checkbox or Drop-down) and its value; e.g., |
Numeric |
Example 1: Order A. Minimum amount in Suborders=150 Suborder A1. Suborder total=150 Suborder A2. Suborder total=120 Example 2, using param5 and param6: Also note that Text, Date, Number and Checkbox fields can be used as param5, while param6 can be typed, for example, as "Approved", parseDate("2013/06/13"), 550, 1, respectively. To set a null value as param6, use the keyword null or 0. |
minute |
Returns the minutes of a Date Time field in param1, i.e., |
Numeric |
|
mod |
Returns param1 modulus param2. |
Numeric |
|
month |
Returns the month of the year of a Date, Date time or strings in param1. January is 0 and December is 11. |
Usually Numeric, but it can also be Text/Note |
|
For related tables only. Can move the target record and related records at once (relation specified in param2) to a certain record group (specified in param1). Param2 is a structure that describes which relation field id is used; Target: Parent table Trigger: Child table or Parent table Criteria: Any Action: |
Any |
It is recommended that the target field (where the result of the formula, i.e, 1 or 0, will be set) is a Checkbox created only for this purpose. Such a Checkbox does not need to be shown in forms, to avoid confusion to users. This way, if the rule’s criteria is fulfilled, then the parent record and its child records will be moved to the specified group and the "Dummy Checkbox" will be automatically ticked. It’s very useful to have this function nested and/or used in combination with other functions. Example: getRecordGroup(RelationFieldToParent, 20) Example 2: Note: The characters in red are part of the syntax of the structure, and therefore must be always written in this way. |
|
Moves the target record to the record group with the value specified in param1. If the value is a constant, type it within quotation marks, e.g., |
Text/Note |
It is recommended that the target field (where the result of the formula, i.e, 1 or 0, will be set) is a Checkbox created only for this purpose. Such a Checkbox does not need to be shown in forms, to avoid confusion to users. This way, if the rule’s criteria is fulfilled, then the current record will be moved to the specified group and the "Dummy Checkbox" will be automatically ticked. Example 1: Criteria → Client = CHANGED Action → Set value of a field with a formula → Formula type = Text/Note
Rule name → Move orders to proper record group Description → The target order will be moved to the proper record group, depending on the value chosen in the Client drop-down, e.g., if Client is changed to "Industrix", the order will be moved to the Record group of the same name. It’s very useful to have this function nested and/or used in combination with other functions. Example 2: |
|
padLeft |
Returns the string of param1 left padded to the length of param2 with pad character param3, useful to standardize strings by filling out its left part. For instance, |
Text/Note |
|
padRight |
Returns the string of param1 right padded to the length of param2 with pad character param3. See padLeft. |
Text/Note |
|
parseDate |
Exclusively used to compare dates in other functions (e.g., in if, match and as param5 in countFields, sumFields, etc.), it validates a string (param1, within quotations) as Date or Date time field using the date/time format of the triggering user, e.g., Note: The function will give different results or fail, for users with different/incompatible date/time formats. Consider using ParseDateFormat(param1, param2, param3) instead. |
Numeric |
|
parseDateFormat |
Exclusively used to compare dates in other functions (e.g., in if, match and as param5 in countFields, sumFields, etc.), it validates a Date or Date time field (param1) using a specific format for the date (param2, within quotations) and a specific format for the time (param3, within quotations), e.g., |
Numeric |
You can also try this function nested as follows:
|
pathValue |
For related tables only. Returns the value of a field from a related record, following the specified path; i.e., can get a parent’s field value or a child’s field value, or a more complex path like getting a parent’s parent field value. -For a simple direct relation to get a field value from a parent record, use: -For a complex direct relation to get a field value from a parent record, use: -For a simple reverse relation to get a field value from a child record, use: |
Any, depending on the type of target field. |
For instance, having the model Region ← Country ← City (where Country is parent of City, and Region is parent of Country), in the "Country" form, pathValue makes it possible for the record "Sweden" to fetch the value in the field called "Region responsible" that is part of the "Region" table. Since the country "Sweden" is related to the region "Northern Europe", the result would be "Erik Svensson" that can be place in a field called "Responsible for all countries in the region" as part of "Country" table located in the "Country" form. Looking at the Example 1 below, 100301 is the ID of the relation between Country and Region, and 100200 is the ID of the "Region responsible" field of Region. The field at the top of the Formula Editor which will get the result is "Responsible for all countries in the region" of Country. The formula is Text/Note type. Example 1: Example 2: Based on the model above, the value of the field "Region responsible" can be got from a "City" record, i.e., from the record "Stockholm" in the "City" form, meaning that it will follow the relation to the parent, then follow the relation to the parent’s parent to finally get the value. Example 3: The Example3 makes it possible to follow a path downwards, to get values from one child record. For instance, Country can get a value from a City: e.g., "Sweden" can get a value from the record "Stockholm". Example 4: pathValue("0_R100302(100058!2!>!#8)_P0_100300_0"), for reverse relation, will return to the target field of the parent record using the relation with ID "100302" (from a child table), the value in the field with ID "100300" of the child record matching the filter (randomly, if resulted in several) made on its field with ID "100058", of type Number, larger than 8. For reverse relation, the triggerRecordValue function can be used instead, where the value of the triggered child record is returned. Notes: The characters in red are part of the syntax of the path, and therefore must be always written in this way (F for direct relations and R for reverse relations). Request help to the IS Tools support team for complex filter syntax (1 Text, 2 Number, 3 Date, 4 Note, 5 Drop-down, 6 Checkbox, 7 Relation, 8 File, 9 Link, 11 Date-time). Field Id’s can be found via the Field usage report in the Data model editor. |
pathValueExists |
To be used in combination with the if and pathValue functions, pathValueExists makes sure that the relations used in the path and the value to be fetched exist.
If pathValueExists returns 1/True (i.e., the path is valid), pathValue is executed. Othewise, returns the value in param3, which is usually 0/False, or returns nothing if the constant IGNORE is used, as in the example above. |
Any, depending on the type of target field. |
|
rand |
Returns a random number between 0 and 1. No parameter is needed. |
Numeric |
|
randomString |
Returns a random string. The length can be set with param1 (if not set the length is 8). |
Text/Note |
Both rand and randomString can be used, for instance, to create unique concatenated alphanumeric identificators. |
recordCreated |
Returns the date when the record was created. |
Usually Numeric, but it can also be Text/Note |
Usually the target field is a Date. But if the resulting value is desired to be stored in a Text or Note field, then this function must be nested in a toDateString function. Example: |
recordCreator |
Returns USERNAME or USERID of record creator. If param1 is given as "true" or "1", USERID is returned. Otherwise USERNAME is returned. |
Text/Note |
Example: |
recordCreatorEmail |
Returns email address of record creator, or an empty string if missing. |
Text/Note |
|
recordCreatorName |
Returns full name of record creator. If param1 is given as ‘true’ or 1, the last name is displayed first (Smith, John). Otherwise the first name is displayed first (John Smith). |
Text/Note |
|
recordId |
Returns the record Id of the target record. |
Text/Note or Numeric |
Can be used as nested in other functions like getRecordGroup. |
recordUpdated |
Returns the date when the record was updated, or 0/’’ (empty string) if missing. No information is returned for deleted data. |
Usually Numeric, but it can also be Text/Note |
|
recordUpdator |
Returns USERNAME or USERID of record update performer. If param1 is given as "true" or "1", USERID is returned. Otherwise USERNAME is returned. No information is returned for deleted data. |
Text/Note |
Example: |
recordUpdatorEmail |
Returns email address record update performer, or an empty string if missing. No information is returned for deleted data. |
Text/Note |
|
recordUpdatorName |
Returns full name of record update performer. If param1 is given as ‘true’ or 1, the last name is displayed first (Smith, John). Otherwise the first name is displayed first (John Smith). No information is returned for deleted data. |
Text/Note |
|
relatedValue |
For related tables only. Returns to a field of a child table the field value of a parent table (param2), using the relation (param1) between these tables, i.e., "copies" the field value of a parent record to a field of all related child records; Target: Child table Trigger: Child table or Parent table Criteria: Any Action: |
Any, depending on the type of target field. |
This is a function that can perform an action on the child table from the parent table (i.e., has the target on the child); the opposite as in other functions for related tables such as maxField, minFields, etc. Example: |
replace |
If the value in param2 is found in the value in param1, then it replaces that string for the one in param3, i.e., |
Text/Note |
Example: |
round |
Returns param1 rounded to the closest integer, e.g., 10.3 → 10, 10.5 → 11; |
Numeric |
|
second |
Returns the seconds of a Date time field in param1, i.e., |
Numeric |
|
sin |
Returns the sine of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
sinh |
Returns the hyperbolic sine of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
sqrt |
Returns the square root of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
str |
Converts param1 to text and returns it. Useful to get a string after nesting other functions, e.g., |
Text/Note |
|
substring |
Returns the part of the string in param1 between the index (position) specified in param2 and param3 (strings are 0 indexed). |
Text/Note |
Example: |
sum |
Returns the sum of a variable number of parameters, which may be Number fields or constant numbers, i.e., |
Numeric |
|
sumFields |
For related tables only. Returns (to a Number field of a parent table) the sum of a Number field (param2) placed in the records of a table with relation (param1) to the parent table, i.e., Target: Parent table Trigger: Child table or Parent table Criteria: Any Action: This function can optionally be used with up to six parameters: -param3, as standalone, is interpreted as a filter condition made on param2; e.g., -param3 and param4 together work as lower and upper bound filter condition; e.g., -param5 and param6 together work as a specific filter condition, using a field reference (Text, Date, Number, Checkbox or Drop-down) and its value; e.g., |
Numeric |
Example 1: Order A. Order grand total=4 Suborder A1. Suborder total=5 Suborder A2. Suborder total=3 Example 2, using param3 and param4: Example 3, using param5 and param6: Also note that Text, Date, Number and Checkbox fields can be used as param5, while param6 can be typed, for example, as "Approved", parseDate("2013/06/13"), 550, 1, respectively. Example 4, using all 6 parameters: |
tan |
Returns the tangent of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
tanh |
Returns the hyperbolic tangent of param1, which may be a Number field or a constant number, i.e., |
Numeric |
|
toDatePattern |
Returns (to a Text or Note field) the value of a Date or Date time field in param1 as a string formatted with pattern specified in param2 within quotation marks, e.g.., The following pattern characters are supported: y = Year, M = Month, w = Week in year (number), W = Week in month (number), D = Day in year (number), d = Day in month(number), F = Day of week in month (number), E = Day in week (text), a = Am/Pm marker (text), H = Hour in day (0-23), k = Hour in day (1-24), K = Hour in day am/pm (0-11), h = Hour in day am/pm (1-12), m = Minute in hour, s = Second in minute. |
Numeric |
Note that the case of the pattern is sensitive; for instance, is not the same to type w or W. |
toDateString |
Returns (to a Text or Note field) the value of a Date field in param1 as a string, i.e., |
Numeric |
See examples of use in lastFieldModifiedDate and lastRecordModifiedDate functions. |
toDateTimeString |
Returns (to a Text or Note field) the value of a Date Time field in param1 as a string, i.e., |
Numeric |
|
toLower |
Returns param1 as a string in lower case, i.e., |
Text/Note |
|
toUpper |
Returns param1 as a string in upper case, i.e., |
Text/Note |
|
triggerRecordValue |
For related tables only. Returns to a field of the target parent table, the value of the field in param1 from the triggered child record, i.e.: Target: Parentgger: Child Criteria: ChildField = <any condition> Action: |
Text/Note |
Example: If a Drop-down field on a child record is changed, then set the value of that child’s drop-down on a Text field of its parent record. Having Project as parent table and Stage as child table (i.e., Project as target table and Stage as trigger table), the criteria would be "Stage status" drop-down == CHANGED, then set the value of "Project latest status" with the formula Project A. Project latest status = Approved by customer Stage A1. Stage status = Sent to customer Stage A2. Stage status = Approved by customer |
Returns user latitude if available. |
Numeric |
Mostly used in combination with other functions. See an example in the userLocationTimestamp function. |
|
userLocationAccuracy |
Accuracy in meters for userLatitude() and userLongitude(). |
Numeric |
Mostly used in combination with other functions. See an example in the userLocationTimestamp function. |
userLocationTimestamp |
Timestamp when userLatitude() and userLongitude() were recorded. |
Numeric |
Mostly used in combination with other functions. Example: if( userLocationAccuracy() < 90 && userLocationTimestamp() < currentDateTime() - 10/1440 , userLatitude() , 0), which will get the latitude position of a user if no more than 10 minutes have passed and precision is closer than 90 meters. Note that there are also useful functions for geolocation via validations and IQL. |
userLongitude |
Returns user longitude if available. |
Numeric |
Mostly used in combination with other functions. |
week |
Returns the week of year of param1, which may be a Date, Date Time field or strings, i.e., The week is defined as a 7-day-period having as first day the one set by the application administrator in the Application preferences form (otherwise, Monday is the default value). |
Numeric |
|
year |
Returns the year of param1, which may be a Date, Date Time or strings, i.e., |
Usually Numeric, but it can also be Text/Note |