Introduction
eLegere uses proprietary code eLL (eLegere Language) to create Formulas useful to perform operations on data.
Formula can be a mix of:
In general, there's a Formula Editor in each point where User can create it with the following features:
- Formula text editor
- Functions selector (by drag & drop)
- Variables selector (by drag & drop)
- Formula's summary (with Name, Description, Return value and Example)
- Validation control (Validate)
![](images/App_Formula_2.png)
Steps to create a formula are:
- Write manually or choose a Formula template or Variables
- Validate it
- Confirm
![](images/App_Formula_1.png)
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:
| #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 |