The Formula Editor
What is the Formula Editor?¶
The Formula Editor is a window in which you can type formulas. Typing formulas injects intelligent behavior in parts of your applications supporting formulas.
In Design Mode, the icon identifies points where you can open the Formula Editor and type formulas.
Info
In every place in the Design Mode where you see the icon, you can open the Formula Editor.
Click on icon to insert a formula whenever you need to automate a calculation, a restriction or another feature of your application.
Features
The Formula Editor has tools to help compiling formulas for your applications. For example:
 Autocompletition
 Comments
 Replacement of pieces of formulas
 Summary of how a function works
 Syntax checking
Check the following sections and the More Commands section to deepen the knowledge of these tools.
Overview¶
A brief overview of the Formula Editor interface.
 This section displays in order from left to right: what the formula is going to do (e.g. Color, Restriction, etc.), the field's name, and the expected data type (e.g. String, Numeric, Date, etc.)
 The editor where you can type a formula.
 The functions and variable reference. You can search the desired function by typing in the search bar or navigating the categories.
 The Clear button clears the formula emptying the editor.
 The Validate button verifies the formula's syntactic correctness.
 The button is the Fullscreen Mode.
Click on the Confirm button to validate and save the formula.
Click on the Cancel button to abort the formula's insertion or undo any changes.
AutoCompletition¶
If you start typing a variable name, a function, a function's option or a Storage's name: the Formula Editor helps by providing some suggestions for completition or reminding the list of a Storage's fields.
Hint
In the editor:
 Typing the
=
symbol triggers the suggestion and autocompletition of functions. E.g.=TEXTJOIN()
,=IF()
,=AND()
,=OR()
.  Typing the
$
symbol triggers the suggestion and autocompletition of variables. E.g.$CURRENTSTORAGE
,$CURRENTDATE
,$CURRENTUSER
.  Typing the
#
symbol triggers the suggestions and autocompletition of Storage names external to the current application. E.g.#sProjectStatus
,#sEmployeeList
.  Typing
$$
triggers the suggestions and autocompletition of Logical Column names. E.g.$$taskNumber
,$$averageRevenue
.  Typing a dot
.
after system variable (e.g.$CURRENTSTORAGE
) or Storage names (e.g.#storageName
) triggers the suggestions and autocompletition of Storage fields names or options. E.g.$CURRENTSTORAGE.fieldName
,$CURRENTAPP.ID
.
Find and Replace Text¶
Find¶
Press CTRL + F to open the Search Bar in the Formula Editor.
You can type a text to find any matches.
Advanced Find
Here is the list of advanced operations and shortcuts for Find:

Match Case (ALTC + C): Enable the casesensitive search

Match Whole Word (ALT+ W): Find exactly that precise combinations of characters.

Use Regular Expressions (ALT+R): Insert a pattern of characters for more complex searches. (See More Commands for more info on advanced features.)

Previous Match (Shift + Enter): Goes to the previous search result.

Next Match (Enter): Goes to the next search result.

Find in Selection (ALT+L): Searches the text only in the formula's part highlighted with the mouse.

Close (Escape): Closes the bar.
Note
Check the More Commands section to deepen the knowledge of Find and these tools.
Replace¶
You can replace one or more texts from the search results with another one.
Press CTRL + H to open the Replace Mode in the Formula Editor. The replacement will be possible after a search.
As alternative, click on the Toggle Replace Mode icon in the search bar.
The action extends the bar with the replacement features.
Advanced Replace
Here is the list of advanced operations shortcuts for Replace:

Preserve Case (ALT+P): Maintains the same capitalization of the text to replace.

Replace (Enter): Replaces the first occurrence from the results.

Replace All (CTRL + ALT + Enter): Replaces all the occurrences from the results.
Note
Check the More Commands section to deepen the knowledge of the Replace and these tools.
Functions Reference¶
The Formula Editor on the right side provides a list of all functions and variables available in eLegere.
If you don't remember how a function works or you want to discover new functions, check the reference on the right side of the editor.
Also, the reference enables you to search and view the available functions.

The functions are divided in categories. Clicking (1) on a function's name opens their description (2). The description explains the function's explanation and syntax.

A list of system variables that you can copy in the editor.
Hint
Click on the icon in the description to copy the function's template and paste it in the editor.
Syntax Validation¶
Before clicking on the Confirm button, you can click on Validate button to check your formula's syntax.
If there is a mistake, the Formula Editor will provide the point and an explanation. You will know if there are any mistakes while writing the formula.
Note
The Formula Editor will validate the formula when you click on the Confirm button as well. If there is a syntax error, the Formula Editor won't proceed with the saving. The Formula Editor will request a correction in this case.
More Commands¶
The Formula Editor provides an helper listing more features to support formulas writing and speed up your work.
Press F1 to call the helper.
Type the name of the key binding or the operation your are looking for in the helper's search bar.
Press ESC to close the helper.
Info
You can deepen your knowledge of Find features and regular expressions, Replace features, and shortcuts that the Formula Editor supports here