Introduction
...
Textual fields are case sensitive. For example, CONTAINS(‘OFFGRID’ ; ‘off’) returns false, but CONTAINS(‘OFFGRID’ ; ‘OFF) returns true.
To concatenate several And/Or conditions, add parentheses for each condition, as in the following example: IF(('unit_is_stationary' = 'Yes')&&('unit_is_stationary' = 'Yes'); 'OK';'Not OK')
Single quotes are supported inside a value only by prefixing them with the escape string(\) i.e. a formula can look like this: 'unit_name' + ' Te\'st' and the result will be unit name Test
...
Function | Explanation | Examples |
---|---|---|
SWAP | The function will convert a numeric field to a text field | Swap(’real_time_status’ ; ‘0:Down’ ; ’999:Off Grid’) |
| The “IF” function is a decision-making condition function between textual fields. Syntax: IF(‘a’ ; ’b’ ; ‘c’) -> if “a” is true then “b” else “c”. We support the following Boolean operations in text fields: ‘a’ = ‘a’ -> True ‘a’ != ‘a’ -> False |
|
CONTAINS | The function CONTAINS('String' ; 'Substring') returns True if 'String' contains 'Substring'. Most of the times will be sued inside an IF function, to check a specific substring in a system field. | CONTAINS('site_layout' ; 'OFFGRID') -> True/ False IF(CONTAINS('site_layout' ; 'OFFGRID') ; 'off-grid' ; 'on-grid') -> 'off-grid'/ 'on-grid' |
NUM | The function can be used to perform numeric calculations in a textual field. Most of the times will be used inside a function, to perform numeric comparisun and return a string. Note that the entire expression inside the NUM function should be inside single quotes. In addition, the entore expression inside the NUM function should follow the syntax of numeric fields, so the following boolean opearions are supported inside the function: NUM('0 == 0') ->True NUM('0 != 0') -> False | NUM('DG1FuelConsumed > 0') -> True/ False IF(NUM('DG1FuelConsumed > 0') ; 'Fuel Consumed' ; 'No Fuel Consumed') -> 'Fuel Consumed'/ 'No Fuel Consumed' |
+ | Simple concatenation function | 'Daniel Unit' + 'Test' -> 'Daniel Unit Test' |
Calculation Field Creation
...