ftos.formulaEngine.run

IMPORTANT!  
Starting with v24.3.0, this is renamed from runCalculation to ftos.formulaEngine.run.

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

This is a business logic method for business service components.

Syntax

Copy
ftos.formulaEngine.run(functionName : string, parameter : any, options: IFtosRunFormulaOption): IFtosFormulaResult;
 
Parameter Type Description
functionName string Name of the formula.
parameter any Set of arguments to be processed by the Formula Engine calculation. These must match the corresponding formula input set up in Formula Engine.
options IFtosRunFormulaOption Set of options for running the formula.

Return Value

Returns a IFtosFormulaResult object, which allows you to retrieve the formula result.

Interfaces

IFtosRunFormulaOption

Set of options for executing a business formula.

Copy
interface IFtosRunFormulaOption {
    referenceDate?: Date;
}
 
Property Type Description
referenceDate(optional) Date The reference date applied when executing the formula. This allows referencing closed versions of a formula that were active before the currently active version.

IFtosFormulaResult

The outcome of executing a business formula. It stores both the inputs provided to the formula and the resulting computed value.

Copy
interface IFtosFormulaResult {
    input: any;
    result: any;
}
 
Property Type Description
input any Arguments that were passed to the formula for execution.
result any The value produced as a result of processing the inputs.

Examples