Variable Fields

Variable fields are special field types that allow you to perform on-demand calculations without saving the results in the database, however the calculated results can be seen in views.

Unlike "calculated value" (formula) fields, variable values do not get stored in the database upon submission, which makes them particularly useful for storing intermediate calculations that are only relevant during a task operation to simplify complex formulas, or for implementing flexible workflows with no need to resubmit the existing records.

As a basic example of variable usage, we will calculate a person's age in an "Age, years" using a numeric variable field.

Instructions

  1. Create or edit a new application and navigate to the 'Forms' section.
  2. Create a Text field 'Name' and a Date field 'Birthday Date'.
    Flowfinity - Variable Fields in Data Management Apps
  3. Create a Numeric field 'Age, years' and set the type as 'variable'. Enter the formula: datediff('year', BirthdayDate, currentdatetime())

The field will now calculate the age of the person based on their birthdate and the current date.

You can use the results of variable calculations in the following areas of Flowfinity Actions: