server.formulas.runFormula

IMPORTANT!  
Starting with v24.3.0, this is deprecated. Use ftos.formulaEngine.run instead.

Runs a Business Formula calculation on a set of input arguments.

Syntax

Copy
function server.formulas.runFormula(formulaName: string, input: any, options: any): any
 
Parameter Type Description
formulaName string Name of the formula.
input any Set of arguments to be processed by the Business Formula calculation. These must match the corresponding formula input set up in the Business Formulae.
options any Allows you to set a reference date prior to the current date if you wish to call an earlier version of the formula.

Return Value

Returns a JSON object containing the details about the calculation. For example:

Copy
{
    ErrorMessage: null,​
    Input: {​​
        calculateInterest: "4.5%",
        loanAmount: 10000,
        loanPeriod: 100​​
    },
    IsSuccess: true,
    Result: "4.5%"
}

Examples