...
When referencing repeat controls and tables, you only need to use the child control name (i.e. the column control name) in the VRB. frevvo takes care of looping through the repeat/table for you!
Tip |
---|
Refer to the Visual Rule Builder chapter or watch this 6-minute video for an overview of how to create dynamic forms/workflows without writing code. |
...
...
This field has two modes:
Expand |
---|
title | Click here to see the available Built-In Functions |
---|
|
User Details FunctionsFunction | Summary | Parameters |
---|
userFirstName | Used to retrieve the user's first name for the current user or for a specific userId. Returns the first name string. | userId - The optional userId of the user to get the first name for. This parameter an be any text expression. If not supplied, then this function returns the first name for the current logged in user. | userLastName | Used to retrieve the user's last name for the current user or for a specific userId. Returns the last name string. | userId - The optional userId of the user to get the last name for. This parameter an be any text expression. If not supplied, then this function returns the last name for the current logged in user. | userFullName | Used to retrieve the user's full name for the current user or for a specific userId. Returns the full name string. | userId - The optional userId of the user to get the full name for. This parameter an be any text expression. If not supplied, then this function returns the full name for the current logged in user. | userEmail | Used to retrieve the user's email for the current user or for a specific userId. Returns the email string. | userId - The optional userId of the user to get the email for. This parameter an be any text expression. If not supplied, then this function returns the email for the current logged in user. | userID | Used to retrieve the userID for the current user or for a specific userId. Returns the id string. | userId - The optional userId of the user to get the id for (typically not used). This parameter an be any text expression. If not supplied, then this function returns the id for the current logged in user. | userManagerID | Used to retrieve the user's manager's user ID for the current user or for a specific userId. Returns the manager user id string. | userId - The optional userId of the user to get the user's manager's user ID for. This parameter an be any text expression. If not supplied, then this function returns the user's manager's user ID for the current logged in user. | userDetail | Used retrieve individual information fields for the currently logged in user. These fields can either be one of the standard fields or a custom field configured using the (ldap) security provider. | fieldName - The name of the user information property to retrieve. This parameter an be any text expression. The standard properties are 'id', 'first.name', 'last.name', 'email' and 'reports.to'. |
Text and Boolean Functions Function | Summary | Parameters |
---|
isFilled | Used to determine if a field (control) has a value. Returns true if the field has a value. | fieldName - The field/control to check for a value. | isEmpty | Used to determine if a field (control) does NOT have a value (i.e. it is not filled). Returns true if the field has no value. | fieldName - The field/control to be checked for no value. | textStartsWith | Tests if this string starts with the specified prefix. Returns true if the prefix parameter is a prefix of the str parameter; false otherwise. | - str - The text to check the prefix of. May be control name, string literal, etc.
- prefix - The prefix text. May be control name, string literal, etc.
| textEndsWith | Tests if this string ends with the specified suffix. Returns true if the suffix parameter is a suffix of the str parameter; false otherwise. | - str - The text to check the suffix of. May be control name, string literal, etc.
- suffix - The suffix text. May be control name, string literal, etc.
| textContains | Returns true if and only if str contains the specified tokenStr. | - str - The text to check if the tokenStr is within. May be control name, string literal, etc.
- tokenStr - The text to search for. May be control name, string literal, etc.
| textBefore | Gets the substring before the first occurrence of a separator. The separator is not returned. textBefore('tim@example.com', '@') = 'tim'. | - str - The text to get a substring from, may be null or a control name as well.
- separator - The text to search for, may be null or a control name as well.
| textAfter | Gets the substring after the first occurrence of a separator. The separator is not returned. textAfter('tim@example.com', '@') = 'example.com'. | - str - The text to get a substring from, may be null or a control name as well.
- separator - The text to search for, may be null or a control name as well.
| textBetween | Gets the String that is nested in between two Strings. Only the first match is returned. The open and close strings are not included. textBetween('tim@example.com', '@', '.com') = 'example'. | - str - The text to get a substring from, may be null or a control name as well.
- open - The text before the substring, may be null or a control name as well.
- close - The text after the substring, may be null or a control name as well.
| concat | Returns the text concatenation of a set of expressions. | - expr1 - A control or expression.
- expr2 - The second control or expression value to be appended to the first.
- expr3 - Optional additional controls or expression(s).
|
Math and Numeric FunctionsFunction | Summary | Parameters |
---|
sum | Returns the sum of a set of numerical items represented by the input parameters. Parameters are expressions that may contain repeating and/or non-repeating controls. | - expr1 - A control or expression. May contain repeating and/or non-repeating controls.
- expr2 - Optional additional controls or expression(s). May contain repeating control or non-repeating control values.
| average | Returns the average of a set of numeric expressions. | - expr1 - A numerical expression. May involve repeating control or non-repeating control values.
- expr2 - Optional additional numerical expression(s). May involve repeating control or non-repeating control values.
| minimum | Returns the minimum value of a set of numerical items represented by the input parameters. Parameters are expressions that may contain repeating and/or non-repeating controls. | - expr1 - A control or expression. May contain repeating and/or non-repeating controls.
- expr2 - Optional additional controls or expression(s). May contain repeating control or non-repeating control values.
| maximum | Returns the maximum value of a set of numerical items represented by the input parameters. Parameters are expressions that may contain repeating and/or non-repeating controls. | - expr1 - A control or expression. May contain repeating and/or non-repeating controls.
- expr2 - Optional additional controls or expression(s). May contain repeating control or non-repeating control values.
| count | Returns the count of items in a control, typically a repeating control, but will accept non-repeating controls. | - expr1 - A control or expression. Typically a repeating control, but will accept non-repeating controls.
- expr2 - Optional additional controls or expression(s). May involve repeating control or non-repeating control values.
| sumif | Returns the sum of a set of numerical items in a repeating control. Takes a boolean filter expression parameter used to determine if each repeating item is included in the calculation. | - expr - The name of a repeating control.
- filterExpr - A required boolean filter expression parameter used to determine if each repeating item is included in the calculation. May include operators, functions, literal values and/or non-repeating controls or repeating controls at the same level.
| averageif | Returns the average of a repeating control's values. Takes a boolean filter expression parameter used to determine if each repeating item is included in the calculation. | - expr - The name of a repeating control.
- filterExpr - A required boolean filter expression parameter used to determine if each repeating item is included in the calculation. May include operators, functions, literal values and/or non-repeating controls or repeating controls at the same level.
| minimumif | Returns the minimum value of a set of numerical items in a repeating control. Takes a boolean filter expression parameter used to determine if each repeating item is included in the calculation. | - expr - The name of a repeating control.
- filterExpr - A required boolean filter expression parameter used to determine if each repeating item is included in the calculation. May include operators, functions, literal values and/or non-repeating controls or repeating controls at the same level.
| maximumif | Returns the maximum value of a set of numerical items in a repeating control. Takes a boolean filter expression parameter used to determine if each repeating item is included in the calculation. | - expr - The name of a repeating control.
- filterExpr - A required boolean filter expression parameter used to determine if each repeating item is included in the calculation. May include operators, functions, literal values and/or non-repeating controls or repeating controls at the same level.
| countif | Returns the count of items/values in a repeating control. Takes a boolean filter expression parameter used to determine if each repeating item is included in the calculation. | - expr - The name of a repeating control.
- filterExpr - A required boolean filter expression parameter used to determine if each repeating item is included in the calculation. May include operators, functions, literal values and/or non-repeating controls or repeating controls at the same level.
| round | Rounds a numeric value to the specified number of decimal digits using a "round half up" policy. The rounded value is returned. | - num - The number that gets rounded.
- decimalDigits - The number of decimal digits to round the number to.
| truncate | Truncates a decimal number to be an integer. | num - The number that gets truncated to an integer. |
Date/Time FunctionsFunction | Summary | Parameters |
---|
today | Used to get the current date. | N/A | date | Used to create a date object. | - year - The date's 4-digit year.
- month - The date's month (1=January)
- day - The day of the month.
| time | Used to create a time of day object. | - hour - The hour of the day (0-23).
- minute - The minutes (0-59).
| timeofday | Used to get the current local time of day (hour and minute). | N/A | datetime | Used to create a dateTime object. | - year - The 4-digit year.
- month - The month (1=January)
- day - The day of the month.
- hour - The hour of the day (0-23).
- minute - The minutes (0-59).
| now | Used to get the current date and time. | N/A | year | Used to get the year from a date or dateTime object or control. | date - The date or datetime to get the year from. | month | Used to get the month (1-12) from a date or dateTime object or control. | date - The date or datetime to get the month from. | day | Used to get the day of the month (1-31) from a date or dateTime object or control. | date - The date or datetime to get the day from. | hour | Used to get the hour from a time object or control. | time - The time to get the hour from. | minute | Used to get the minute from a time object or control. | time - The time to get the minute from. | daysBetween | Used to get the number of days between date1 and date2. If date1 is earlier that date2, then the result is 0 or positive; otherwise 0 or negative. | - date1 - The first date or date-time.
- date2 - The second date or date-time.
| monthsBetween | Used to get the number of months between date1 and date2. If date1 is earlier that date2, then the result is 0 or positive; otherwise 0 or negative. | - date1 - The first date or date-time.
- date2 - The second date or date-time.
| yearsBetween | Used to get the number of years between date1 and date2. If date1 is earlier that date2, then the result is 0 or positive; otherwise 0 or negative. | - date1 - The first date or date-time.
- date2 - The second date or date-time.
|
|
Functions are entered into the Enter an Expression field in the wizards.
Image Added
This field has two modes:
Lookup Mode
Lookup mode displays functions and controls from your form/workflow. The functions matching the typed text are displayed first followed by the form/workflow controls.
...
Use the Operators listed below to build the rule expression.
Operator | Name | Purpose | Example |
---|
+ | Addition | Add two numeric sub-expressions | a + b |
- | Subtraction | Subtract two numeric sub-expressions | a - b |
* | Multiplication | Multiply two numeric sub-expressions | a * b |
/ | Division | Divide two numeric sub-expressions | a / b |
+ | Concatenation | Concatenate two text sub-expressions (Javascript only - for VRB use concat() function) | firstName + " " + lastName |
and | Logical AND | Logically AND two boolean sub-expressions | isRetired AND isCollecting SS |
or | Logical OR | Logically OR two boolean sub-expressions | isOnVacation OR isOnSickLeave |
== | Equality | Compare two sub-expressions for equality | a == b |
!= | Inequality | Compare two sub-expressions for inequality | a != b |
> | Greater than | Compare two sub-expressions for greater than | a > b |
>= | Greater than or equal | Compare two sub-expressions for greater than or equal | a >= b |
< | Less than | Compare two sub-expressions for less than | a < b |
<= | Less than or equal | Compare two sub-expressions for less than or equal | a <= b |
Info |
---|
In versions prior to v9.1, the '+' operator was used for both addition and concatenation. With the v9.1 upgrade, any '+' operators used for concatenation will be automatically updated to use the concat() function. Designers should use the concat() function for concatenation of text strings, and the '+' operator only for addition of numeric values. Using the '+' operator for concatenation will return an error prompting the designer to use concat() instead. |
...