How to configure a Formula column
This guide shows how to create a formula column in the Table Grid Next Generation.
You can input formula inside embedded JavaScript Editor and get results on the grid view. The grid can process formula logic and display formula results in a separate column.
Configuration
Input formula inside embedded JavaScript Ace Editor and get results on the grid.
It's possible to execute different operations using formulas. To create the formula expression use JavaScript.Â
Prerequisites:Â configured grid and columns. You need other columns in the grid to create a formula expression.Â
Add a new column to the grid, using Formula.
- Input column's details:
Column type - select Formula type.
Identifier - a unique variable to identify the column. Required field - you can set the desired value here.
Title -Â column title, displayed in the grid.Â
Column IDs -Â list of existing columns' IDs. Use in order to create a formula.
Formula expression - embedded JavaScript editor, where you need to input your formula. Uses Ace Editor, which highlights the syntax.Â
Summary Label -Â label name, that will be used in the column summary.
Aggregation operation -Â Â select aggregation operation of the column data: sum, average, min/max or custom formula.
 Input the formula, based on the grid columns' IDs.
Attention
Use column IDs in the formula expression.
Formula exampleif($(calculate)){ return $(salary) + $(bonus) } else { return $(salary) }
- Save changes.
Congratulations! You just created your first formula.Â
Check more examples of formula expressions and usage on the formula configuration page.