How can we help?

Search for answers or browse articles about Sintel Apps

You are here:

Calculated Fields

Calculated fields allow you to automatically calculate, format, or generate values based on other fields in a form. Rather than requiring users to enter the same information multiple times, formulas can perform calculations, combine text, apply business rules, and create dynamic content.

Common uses include:

  • Calculating invoice totals
  • Generating full names
  • Creating personalised messages
  • Calculating the number of days since a request was created
  • Assigning a priority score
  • Determining approval requirements
  • Creating usernames or reference numbers

Calculated fields use JavaScript expressions with field tokens, making them both powerful and flexible.

Fields that can contain formulas

Only the following field types can be configured as calculated fields:

  • Text
  • Number
  • Currency
  • Multiline Text

Fields that can be referenced in formulas

Formulas can reference values from:

  • Text
  • Number
  • Currency
  • Multiline Text
  • Choice
  • Lookup

Creating a Calculated Field

  1. Add a Text, Number, Currency, or Multiline Text field.
  2. Open the field properties.
  3. Enable Calculated.
  4. Enter your JavaScript expression.
  5. Save and publish the form.

Once a field is configured as calculated:

  • It becomes read-only
  • It updates automatically whenever referenced fields change
  • Users cannot edit the calculated value manually

 

Referencing Fields

Fields are referenced using their Internal Name wrapped inside double curly braces.

Example:

{{FirstName}}

To combine two fields:

{{FirstName}} + " " + {{LastName}}

 

Tip: Always reference the field’s Internal Name, not its display title.

 

How Calculated Fields Work

Calculated fields:

  • Recalculate whenever referenced fields change.
  • Do not calculate while a form is in View mode.
  • Must exist somewhere in the form layout.
  • Can be hidden if they are only required for workflows or further calculations.

 

Example 1 – Display a User’s Full Name

You have two single-line text fields that capture a user’s first name and last name, and you want to display their full name elsewhere on the form automatically.

Form Setup

Create the following fields:

Field Type Display Name Internal Name
Text First Name FirstName
Text Last Name LastName
Text Full Name FullName

Open the Full Name field, enable Calculated, and enter the following formula:

{{FirstName}} + " " + {{LastName}}

 

Result

If the user enters:

  • First Name: Harry
  • Last Name: Potter

The Full Name field will automatically display: Harry Potter

 

Example 2 – Calculate an Invoice Total

You want to automatically calculate the total price by multiplying the quantity by the unit price.

Form Setup

Create the following fields:

Field Type Display Name Internal Name
Number Quantity Quantity
Currency Unit Price UnitPrice
Currency Total Total

Open the Total field, enable Calculated, and enter the formula:

{{Quantity}} * {{UnitPrice}}

 

Result

Example 3 – Calculate Days Open

You want to display how many days have passed since the request was created.

Form Setup

  1. Create a Date field at the start of the form.
    • Set the Default Value to Today.
    • When the author first creates the form, this field will automatically be populated with the creation date.
  2. Add a Number field named Days Open.
    • Enable Calculated.
    • Enter the following formula:
    • Math.floor((new Date() - new Date({{Created}})) / (1000 * 60 * 60 * 24))

       

Result

Example 4 – Automatically Determine the Urgency of a Request

In the previous example, we created a calculated field called Days Open that displays how many days have passed since a request was created.

We can now use that calculated value to automatically determine the urgency of the request.

This is particularly useful for Help Desk, Service Desk and Support forms where requests become more urgent the longer they remain unresolved.

Form Setup

Using the Days Open calculated field created in the previous example, add a new Single Line of Text field.

Field Type Display Name Internal Name
Number Days Open DaysOpen
Text Urgency Urgency
Open the Urgency field, enable Calculated, and enter the following formula:
{{DaysOpen}} >= 14
    ? "Critical"
    : {{DaysOpen}} >= 7
        ? "High"
        : {{DaysOpen}} >= 3
            ? "Medium"
            : "Low"

As the number of days increases, the urgency level is automatically updated. Because the Urgency field is itself calculated, users cannot change it manually, ensuring requests are prioritised consistently.

Result:
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
Please Share Your Feedback
How Can We Improve This Article?
Table of Contents