Skip to content

Introduction

eLegere uses proprietary code eLL (eLegere Language) to create Formulas useful to perform operations on data.

Formula can be a mix of:

How to create formulas

In general, there's a Formula Editor in each point where User can create it with the following features:

  1. Formula text editor
  2. Functions selector (by drag & drop)
  3. Variables selector (by drag & drop)
  4. Formula's summary (with Name, Description, Return value and Example)
  5. Validation control (Validate)

Steps to create a formula are:

  1. Write manually or choose a Formula template or Variables
  2. Validate it
  3. Confirm

Categories

Category Description
FUNCTIONS Formulas performed Server or Client side
VARIABLES Statements returning system or Calculated Logical Colum data

Functions Types

Type Description
COMPARISON To compare data
CONDITIONAL To manage the behaviour between given condition and expected result
CONVERSION To convert values from original data type to numeric, string or date
DATE To manipulate date
LINK To generate App link or specific App row link
LOGICAL Returning Boolean (true or false) value
LOOKUP Returning value / list of values from a storage based on search condition
NUMERIC To perform mathematics operations
SPATIAL GEOMETRY To manipulate latitude or longitude data
STRING Returning string value
TIMESPAN To manipulate timespan data
VALUES LIST Returning list of values

Conditional Operators

Operator Description
== Equal
<= Less than or equal
>= Greater than or equal
< Less than
> Greater than
!= Not equal

Arithmetic Operators

Operator Description
+ Addition or unary plus
- Subtraction or unary minus
* Multiplication
/ Division

Constants

Constant Description
true
false
null
=LIST(-1) Empty list
=LIST() Full list values

References

In eLegere Formulas you can use a reference that identifies field of a Storage and tells where to look for the data you want to use in a formula.

Following is the syntax:

1
#Storage_Name.Field_Name.VALUE (.OLDVALUE) or .METADATA (.METADATA.ORIGINAL)
Syntax Description
# To access to the Storage
Storage_Name Replace with the name of the Storage
. Separator between Storage_Name and Field_Name
Field_Name Replace with the name of the column of the Storage
. Separator between and Field_Name and VALUE or METADATA
VALUE or METADATA Depending on the Function and where you wants to use it
OLDVALUE or METADATA.ORIGINAL Depending on the Function and where you wants to use it and if you want to take value previously saved before changing it