Formula Editor

The FintechOS Formula Editor is a complex tool found in the Studio. It is the place where a user writes an actual mathematical expressions and calculations. The FintechOS Formula Editor is found at the bottom of the “Add/Edit formula step” form.

For example, based on what a client inserts as data in his/hers KYC, the editor takes that information and uses the calculation formula inserted into the Editor to return data such as the net income of a loan applicant or the age limit for a contract or the insurance premium for a policy using complex arguments and functions. It is possible to test the formula inserted here by running a test. For more information about running a test, see Define Formula Expressions.


In the Editor, a user inserts the formula that is built based on a given mathematical syntax whose structure is made of the formula body and the call for calculation which is the actual result. Intellisense is available for quick selection of definitions, with the possibility to get more info (such as properties and attributes) about the selected item.

When writing the formula, make sure that each formula matches to the step you are working on because the result may be used as input in the following steps.

Use the following syntax in the formula editor to define a formula output:

result = <formula expression>;

For formulas that return collections, use the following syntax (make sure that the formula expression includes an iteration argument):

result[i] = < ... iterationArgument[i] ... >;

For recursive formulas, define a simple type whole number formula and include a whole number argument in the Number of Iterations field (see Define Formula Expressions for details). For example, to generate a collection with the first x numbers in Fibonacci sequence, use a whole number input argument called x for the number of iterations (make sure x is greater than or equal to 2) and use the following formula expression:

result[0] = 1; result[1] =1; result[i] = result[i-1] + result[i-2];

When the formula body is complex, needs periodic update or must be simplified for transparency and traceability, we suggest you split it in separate steps, each with its own expression.

You can include multi-line C# code in the formula expression, as long as you assign a result value:
var a = 1;
var b = 2;
result = a + b;

The order of execution between operations such as addition “+”, substraction “-“, multiplication “*” and division “/” is respected and you can further control this by using parantheses () or by splitting the formula in steps.

In a formula receiving an argument data of a complex type with properties A,B,C of type string and D,E of type numeric, we can write:

var result = FROM(data).GROUPBY(["A","B"]).SUM("D");

The result will be a collection of items with properties A,B and C, where C will be the SUM for the group determined by the content of properties A and B

Pressing Ctrl+Space will launch the Intellisense that can help you learn more about the formula you are editing, keep track of parameters you’re typing, add calls to functions and various information with only a few keystrokes.

Formula can be of the following types:

  • constant f = sum(1,n)
  • linear f(x) = 2*x+1 , where x = 1,100
  • 2-dimensional f(x,y) = x*y+30;
  • n-dimensional etc.
  • recursive f(x) = f(x-1)+20.
Already pre-defined Steps also appear in Intellisense since they can be called in any subsequent step.

Click the ''Save and Close'' button.

Formula Arguments

Primary formula arguments are defined in the formula input (see Define Formula Inputs). For example, if we have defined an argument called days in our formula input, we can create a formula step called years to convert the number of days into years with the following expression:

result = days / 365;

We can also use previous steps' outputs as arguments for subsequent step inputs. For example, after the above step, we can create a step that calculates an interest by multiplying the principal and rate input parameters with the years result from the previous step:

result = principal * rate * years


Built-in Functions

You can include the following built-in functions in your formula expressions:

Function Description Example



SUM function can be used to add all numbers in a range of cells. The arguments can be numbers, cells references or formula-driven numeric values.

For instance, if you would like to calculate the sum of all items part of an array then you need to use an iteration formula.

SUM([1, 2, 3])


ABS(Number) It returns the absolute value of the number. ABS(-3)


POWER(Number, Exponent) Calculates how many times to use the number in a multiplication. POWER(10,3) 1000
ODD(Number) Specifies if the number is odd. ODD(12)


EVEN(Number) Specifies if the number is even. EVEN(26)


TRUNC(Number) Truncates the number to a specified number of decimal places. TRUNC(17.51)


ROUND(Number, Precision) Rounds the number to the specified number of digits. ROUND(17.51)


ROUNDUP(Number) Rounds the number upward to the specified number of digits. ROUNDUP(-0.6)


ROUNDDOWN(Number) Rounds the number downward to the specified number of digits. ROUNDDOWN(1.9)


FLOOR(Number) Receives one parameter and rounds the number down. FLOOR(6.7)


IIF(Condition, TrueExpression, FalseExpression) IF function is a "conditional function" because it returns a value based on the condition that you specify.  


COUNT(Vector) Returns the number of numerical values (numbers and dates) in the list of arguments.  


COUNTIF(Vector, FilterExpression) Counts the number of cells within the range that meet the specified criteria.  


MIN(Vector) Returns the minimal value from the list of arguments in a row. MIN(1,2,3,5,6)


MAX(Vector) Returns the maximum value from the list of arguments in a row. MAX(111,22,33,44,55)


AVERAGE(Number1, Number2, Number3, …) Returns the average of the arguments. AVERAGE(1234,67543,5752)


AVERAGE(Vector) Returns the average of the arguments in a row. AVERAGE ([4643,652348,83284])


SUMIF(Vector, FilterExpression)

Adds up the cells in a specified range that meet a certain condition. SUMIF can evaluate only a single criteria.

“it” is a mandatory term, standing for “item” of an array, for all Filter Expressions in all formulas which evaluate an expression.



SELECT(Vector, TransformExpression)


SELECT (IncomeList, it * Database (''IncomeAdjuster''))


RANGE(Vector, RangeOperators) Navigate inside an array RANGE([1,2,3,4,5,6],SKIP(2)])



Combined with RANGE function, you can skip an item of an array, in case for example you would like to add all items except the 3rd one in the array.



TAKE(Number) Combined with RANGE function, you can take as many array items as indicated by the input parameter.  


RATE (nper, pmt, pv, [fv], [type], [guess])

Returns the interest rate per period of an annuity. You can use RATE to calculate the periodic interest rate, then multiply as required to derive the annual interest rate.


  • nper - The total number of payment periods.

  • pmt - The payment made each period.

  • pv - The present value, or total value of all loan payments now.

  • fv - [optional] The future value, or desired cash balance after last payment. Default is 0.

  • type - [optional] When payments are due. 0 = end of period. 1 = beginning of period. Default is 0.

  • guess - [optional] Your guess on the rate. Default is 10%.

RATE(36, 150, -5000)


PMT (rate, nper, pv, [fv], [type])

Calculates the payment for a loan based on constant payments and a constant interest rate.


  • rate - The interest rate for a loan.

  • nper - The total number of payments for a loan.

  • pv - The present value, or the total amount that a series of future payments is worth now; also known as the principal.

  • fv - [optional] The future value, or a cash balance you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (zero), that is, the future value of a loan is 0.

  • type - [optional] Indicates when payments are due:

  • 0 or omitted - at the end of the period

  • 1 - at the beginning of the period

A 3-year (36 months) loan for 10000 USD at 8% interest rate:

PMT(0.08/12, 36, 10000)



For Simple types


For Collection types


For Simple Collections types



Formula Built-in Excel Functions


Formula Built-in DateTime Functions

Data Set Calls

To extract value mappings from data sets (see Data Sets for details), use the following syntax:

DataSet("<data set name>", ("<discriminant 1 name>", <discriminant 1 value>), ("<discriminant 2 name>", <discriminant 2 value>) ... )

If all the discriminants are given as a parameter, the result will be a value. However, if one of the discriminants is not sent as a parameter, the result will be an array.

You can only call data sets that are active. For details, see Data Set Versioning.