Skip to main content
Skip table of contents

Formulas

Overview

Formulas let you define your own functions for use in expressions, which are used in Data Management tools such as Calculate and Filter.

Like projects and macros, formulas are fully version-controlled in the repository, so every time you edit a formula and save it, a new version is created. Any expressions using a formula will automatically detect new versions of a formula.

Defined formulas appear in the function tree of Data Management's expression editors. You can select a formula from the function tree and use it in an expression just like Data Management's built-in functions.

Add formulas

To add a new formula to the repository:

  1. In the repository, right-click the Formulas icon, and then select New Formula.

  2. Specify a Formula name and Result Type.

    • Formula name: can be any string.

    • Result type: can be any standard data type. See Configuring Data Types for more information. The field should be large enough to hold the results of the formula.

  3. Specify all parameters used in your expression in the Input arguments grid. Define Field and Type as in step 2.

  4. Enter your formula in the Expression box. Use any combination of mathematical operations and functions that is appropriate for your return type.

  5. Select Insert to select defined functions or formulas.

Errors will be listed in the Errors and messages box. Select an error message to highlight the incorrect part of the expression.

image-20240322-191008.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.