Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

...

Function

Explanation

Examples


MIN/MAX

The function will display the smallest/largest number between two or more fields or numbers

Min(unit_id; 1000)

Max(unit_id; 13.5)

AVG

The function will display the average between two or more fields or numbers

AVG(a1; a2; a3; ...)

ABS

The ABS function returns the absolute value of the given number

ABS(-10)



IF

The “IF” function is a decision-making condition function between numerical fields.
The function will take its first param and run it in a numeric engine. We can use this feature only inside of an if operation, like this: IF( Num(‘2 > 1’), ‘Yes’, ‘No’ ) -> Yes.
Syntax: IF(a; b; c) -> if a is true, return b, else return c.

The following boolean operations are supported in numeric fields: "<", ">", "==", "!="

0 == 0 -> True

0 != 0 -> False


IF(unit_id > 1000; 10; 9)

...

  • Advanced Textual functions

    (warning)

    All text/string in textual fields must be written inside single quotes, i.e., ‘Text’ (not including function names).  

(warning)

You must use a semicolon (

;

) sign to separate the clauses in the equation instead of a regular comma.

(warning)

...

Textual fields are case sensitive. For example, CONTAINS(‘OFFGRID’ ; ‘off’) returns false, but CONTAINS(‘OFFGRID’ ; ‘OFF) returns true.

(warning)

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')

(warning)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’)




IF

The “IF” function is a decision-making condition function between textual fields.

IF operation – syntaxSyntax: 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




IF('unit_name' = ‘arkadi test’ ; ‘true’ ; ‘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')

IF(CONTAINS('site_layout' ; 'OFFGRID') ; 'off-grid' ; 'on-grid')


Calculation Field Creation

...