i

Please enable JavaScript to view this site.

Documentation 8.3

Functions in this category are used in embedded rules modeling by means of their wizard.

 

 

Descriptive Name

Description

Example

IF(logical_test,value_if_true,value_if_false)

Checks if the condition indicated in "logic_test" is met. If it is true, it returns the value informed in "value_if_true", if not, it returns the value informed in "value_if_false".

The "value_if_false" parameter is optional, if the condition is not met and such parameter is not defined, the function does not return a value.

IF(amount > 1000000, "Amount exceeds limit")

If the amount is greater than 1,000,000, the user receives the "Amount exceeds limit" message.

AND(logical_value1, logical_value2,...)

Evaluates that all parameters return "True", in which case it returns "True" value.

AND(day() > 5, month() == "April")

Returns "True" only when the day of the month is greater than 5 and the month is April.

OR(logical_value1, logical_value2,...)

Evaluates all parameters and returns "False" value if all parameters return "False". If at least one of them returns "True", it returns "True" value.

OR(contact == “AFARIAS”, currentUser() == “AFARIAS”)

Returns "False" only when the current user and contact are different from AFARIAS.

NO(logical_value)

IF"logical_value" is "True", it returns "False" value. IF"logical_value" is "False", it returns "True" value.

NO(5 > 1)
Returns "False", since it is the logical value contrary to evaluation 5>1.

ADD(number1, number2,...)

Adds all parameters.

ADD(AmountInvoiced, TaxAmount)

Returns the value resulting from adding both amounts.

CONCAT(text1,text2,...)

Joins multiple text elements into one.

CONCAT(“Hello,”, currentUser())

Returns "Hello AFARIAS", where AFARIAS is the current user.

MAX(number1, number2,...)

Returns the maximum value from a list of parameters. Ignores logical values and text.

MAX(2, 5, customerNumber, 22)

Returns 22.

ISBLANK(value)

Checks the value of the reported parameter and returns "True" if it has no content. If the parameter is an iterative field, all its occurrences must be empty for it to return true.

ISBLANK(description)

Returns "False", when description has content.

isURL(text)

Indicates whether the text entered corresponds to a valid URL format.  Valid Examples:

www.sitename.com ; sitename.com; https://sitename.com

192.1.1.111;  192.1.1.111:8090 ; 192.1.1.111:8090/myfunction

IF(NO(isUrl(field)), "Must inform URL")

If field is equal to "Deyel.com", the user does not receive any messages.

REPLACE(text to search; text to replace; original text)

Replaces in "original text", the "text to search" matches with "text to replace".

 

 

REPLACE("Supplier XX", "New Supplier", contractText)

As a result, the original content of the contractText field remains with all occurrences of Supplier XX replaced with New Supplier.

REGEXMATCH(text, regular_expression)

Returns "True" value if the first parameter meets the regular expression indicated in the second parameter.

 

Regular expressions, also known as regex, are widely used, standardized writing patterns used mainly to process texts. They allow, for example, to validate formats, extract a part of text or replace occurrences of a character string. There are many free access sites that provide information on use and syntax and offer the possibility to perform simulations as tests.

 

If the '\' character is used in the expression, it should be duplicated. If it is not duplicated, the expression is not evaluated as expected.

REGEXMATCH(myField,”^[0-9]*$”)

Returns "True" if myField is made up of numeric characters between 0 and 9.

 

REGEXMATCH(myField,"^[AZ]{3}\\d{6}"

The bar in the expression is duplicated. 

 

equalInAllValues(iterative_field, value)

Returns "True" value if all occurrences of "iterative_field" match with "value".

equalInAllValues(customerNo, 136)

Returns "True" if all occurrences of the CustomerNo iterative field has a 136 value.  

equalInSomeValue(iterative_field, value)

Returns "True" value if any of the occurrences of "iterative_field" matches with "value".

equalInSomeValue(customerNo, 136)

Returns "True" if one or more occurrences of CustomerNo iterative field has a 136 value.

FIRSTVALUE(list)

Returns the first value in a list.

FIRSTVALUE(Items.quantity)

Returns 5, the first value of the iterative quantity [5, 3, 2, ...].

QUANTITY(list)

Returns the length of a list.

QUANTITY(Items.price)

Returns 3, the iterative price being [100,50,30].

EXTRACT(text, position, amount_characters)

Returns a subset of text characters, given an initial position and length.

EXTRACT("The user was successfully deleted", 13, 12

Returns the characters "was deleted".

NUMBER(alphanumeric_value)

Transforms an alphanumeric into a number.

NUMBER("1988")

Returns number 1988.

ROUND(numeric_value, decimals)

Rounds a number to a specified number of decimal places. If the digit after the specified position is greater than or equal to 5, the digit is rounded up. Otherwise, it is rounded down. This happens regardless of the sign. It is recommended to use this function when using 4- and 5-place decimals.

ROUND(49.9999, 0)

Returns number 50.        

extension(file)

Returns the extension of a file type field.

extension(contract)

If the contract field is equal to "contract_2022.pdf", it returns "pdf".

length(text)

Returns the number of characters entered in an alphanumeric field or the number of digits in a numeric field.

length(password)

If the password field is equal to "deyel123", it returns number 8.

REMOVESPACES(text)

Removes spaces at the beginning and end of a field.

REMOVESPACES(email)

If the email field is equal to

" afarias.fa@gmail.com ", returns "afarias.fa@gmail.com".

ESCAPEHTML(text)

Removes formatting from the content of a rich type text field.

escapeHTML(notes)

Returns content of "notes" field without formatting.

mathPower(base, exponent)

Returns the base raised to the indicated exponent.

mathPower(2, 3)

Returns number 8.

 

 

Functions are allowed to be nested in parameters.

Send us your comment
Share on Twitter Share on Linkedin Send by Email Print