 ## EQUATION / FORMULA

To calculate the result, you must use the variables in the Formula field

• Variable x[] – the variable is used for the field that takes part in the calculation
• Variable y[] – variable for displaying the result
``````y = x + x;

y = x - x;

y = x * x;

y = x / x;
`````` You can use the additional variables in the formula field to facilitate writing the formula and displaying the result. For Example, Formula Monthly payment for Loan:

``````let r = x / 1200;
let A = x;
let N = x;

let result = ( r * A ) / ( 1 - Math.pow((1+r), -N));
y = roundVal(result, 2);
``````

roundVal(val, decimals) – function for rounding a number. The first parameter (val) is the number to be rounded, and the second parameter (decimals) is the number of numbers after the decimal point. ### Сonditional formula

You can use complex structures to calculate the results. the ability to use the following comparison operators:

• less
• more
• ==  equal

For Example:

``````
if( x < 100 ) {
y = x * 2;
} else if ( x < 200 ) {
y = x * 3;
} else {
y = x * 4;
}
``````