This topic describes how to configure the conditions part of an ECA rule for widgets.
A condition must be specified for every ECA rule. A condition is the part of an ECA rule that performs a logical test that causes the actions that are defined in the "Actions if true" part of the ECA editor to be carried out if it evaluates to true. If the condition part of an ECA rule evaluates to false, the actions that are defined in the "Actions if false" part of the ECA editor are carried out. For information on how to define actions in the ECA editor for an ECA rule, see Defining actions for an ECA rule.
The outer operator is arithmetic, which can include only the following operators in the expression: addition, subtraction, multiplication and division. However, if you select a logical operator in outer expression, logical and arithmetic operators are displayed in the expression.
Category | Function name | Description | Is server side | Is client side |
---|---|---|---|---|
String | concat | Concatenates two Strings | Y | Y |
length | Returns the length of a string | Y | Y | |
contains | Returns whether a substring is part of a string | Y | Y | |
subString | Returns a portion of a string | Y | Y | |
indexOf | Returns the position of a substring | Y | Y | |
lastIndexOf | Returns the position of a substring starting from the end | Y | Y | |
replace | Replaces all occurrences of a substring in a string with a new value | Y | Y | |
trim | Remove leading and trailing blanks | Y | Y | |
upperCase | Converts a String to upper case | Y | Y | |
lowerCase | Converts to lower case | Y | Y | |
compare | Compares two strings lexicographically. Return 0 if string1 is the same as string2, return >0 if string1 is after string2, return <0 if string1 before strings in dictionary order | Y | Y | |
compareIgnoreCase | Compares two Strings lexicographically ignoring case differences. Return 0 if string1 is the same as string2, return >0 if string1 is after string2, return <0 if string1 before strings in dictionary order | Y | Y | |
Number | round | Returns the closest long or integer to a number | Y | Y |
truncate | Returns the truncated value of a number | Y | Y | |
absolute | Returns the absolute value of a number | Y | Y | |
Date | today | Returns the current date | Y | Y |
dayOfWeek | Returns the day of the week | Y | Y | |
year | Returns the year of the day in number | Y | Y | |
month | Returns the month of the day in number | Y | Y | |
day | Returns the date of the day in number | Y | Y | |
after | Returns the date which is after than a given date with specified(days, months, years) period | Y | Y | |
before | Returns the date which is before than a given date with specified(days, months, years) period | Y | Y | |
daysBetween | Returns the days between the two dates in decimal as time in day is taken into account | Y | Y | |
natureDaysBetween | Returns the nature days between the two dates ignoring time difference | Y | Y | |
parseDate | Returns date in BTT Date type. 'pattern' argument defines the format (such as 'dd/MM/yyyy') of date parameter | Y | N | |
toString | Returns date in String. 'pattern' argument defines the format (such as 'dd/MM/yyyy') of return date | Y | N |