Function type Field

Introduction

A Function Type Field is a special field that dynamically calculates or processes data using formulas. These formulas can handle arithmetic, strings, dates, logical operations, and arrays to automate data manipulation and enhance document functionality.


How to Configure a Function Type Field

  1. Select the Field Type: Choose Function as the field type when configuring the field.
  2. Define the Formula: Enter a formula in the field configuration. This formula determines the output of the field based on the input data or predefined conditions

Available Formulas for Function Type Fields

  • SUM([{field1}, {field2}]): Adds the numeric values of field1 and field2.

    Example: SUM([{price}, {tax}]) calculates the total amount by adding the price and tax.
  • UPPER({field}): Converts the text in field to uppercase letters.

    Example: UPPER({client_name}) transforms “John Doe” into “JOHN DOE”.
  • IF({field} > X, “A”, “B”): Evaluates a condition; if field is greater than X, it returns “A”, otherwise it returns “B”.

    Example: IF({age} > 18, “Adult”, “Minor”) returns “Adult” if the age is over 18; otherwise, it returns “Minor”.
  • CONTAINS({field}, “@”): Checks if the field contains the “@” character, commonly used to validate email addresses.

    Example: CONTAINS({email}, “@”) returns true if the email field includes “@”, indicating a valid email format.
  • TODAY(): Returns the current date.

    Example: TODAY() might output “March 26, 2025”.
  • TEXTSPLIT(“.”, {field}): Splits the text in field into an array using the period “.” as a delimiter.

    Example: TEXTSPLIT(“.”, {full_name}) splits “John.Doe” into [“John”, “Doe”].
  • EQUALS({field}, “X”): Checks if the value in field is exactly equal to “X”.

    Example: EQUALS({status}, “Approved”) returns true if the status is “Approved”.
  • ARRAYINCLUDES([{field}], [“X”, “Y”]): Determines if the array in field includes either “X” or “Y”.

    Example: ARRAYINCLUDES([{roles}], [“Admin”, “Editor”]) returns true if the roles field contains “Admin” or “Editor”.