Calc: Formula

Formula based on other fields

Properties

User interface

Field in show mode

image.png

Due to its nature this field has no special editing mode.

Configuration

image.png

[Description of configs]

Complex formulas

Calculated formulas syntax follows is compliant with JavaScript syntax.

Common operators

Mathematical functions

Mathematical constants

Support for statements

This feature is enabled starting from version 2366.

IF statement

Syntax used matches JavaScript inline IF statements.

To make the statement work make sure to add a space: before ), after (, before and after ? and :.

( Value1 Operator Value2 ? ValueIfTrue : ValueIfFalse )
Examples

Script code / specification

 var result;
 if ( [NUMBER1] >  [NUMBER2] ) {
       result = [NUMBER1] * 11;
 }
 else {
       result = [NUMBER3];
 }
 return result;

Expression to use in formula

( [NUMBER1] >  [NUMBER2] ? [NUMBER1] * 11 : [NUMBER3] )

Developer info


Revision #4
Created 1 April 2025 13:31:29 by Theis Villumsen
Updated 28 July 2025 12:53:34 by Theis Villumsen