Important! In formulas, it is important to specify the names of fields in the same case as they are specified in Kommo entities. Also, for the formulas to work correctly, the fields involved in calculations must have the "API filling" property disabled
It is necessary to specify the name of the field in which the calculation will be performed in the "Field" cell. After that, we insert the formula. The formula consists of a keyword (Lead) and the name of the field (from where the value for the calculation will be taken). After writing the formula, go to the lead and fill in the fields that were used for the formula.
Important: Any mathematical signs can participate in the formula, such as addition and subtraction, as well as division and multiplication. If necessary, the formula is not limited to 2 variables, an unlimited number of variables necessary to obtain the result can participate in the formula.
Hints
In the formula input field, there are field hints that can be used for the formula. To search for the required field, enter "["
Application
If the numbers are simply glued together during arithmetic operations, then it is necessary to wrap each variable in parseInt(lead['field In the lead']))
If you need to create a logical field that will be filled in if there is data in another field, then the formula will look like this: lead['field 1'] == 'success' ? 'yes' : no, where field 1 is the field whose value is taken for the formula, success is the value (number, word, string) with which the value of field 1 is compared, 'yes'/'no' - instead of them, a number, word, string is substituted and during the logical check (lead['field 1'] == 'success') the result will be one of the options.
Also, instead of the == sign, the following logical signs can be used:
■ >= - greater than or equal to some value;
■ <= - less than or equal to some value;
■ > - more than some value;
■ > - less than some value;
■ !== - not equal to any value.
If it is necessary that the numbers after the decimal point are cut off from the resulting result, then you must use the function.toFixed(x), where x is a number indicating how many digits after the decimal point there will be