The Calculate field performs calculations based on input values, whether it's numerical operations (like addition, subtraction, etc.) or string calculations (like combining names, converting numbers into words, etc.).
Field Name: Provide a unique name for the field which is visible for CDs while building application.
Label Name: Provide a unique name for the field which will be visible for the end-users.
Help Text: Enables the addition of helpful text to indicate the field's related value. The help text appears when the cursor hovers over the field.
Create Formula Link: Enables the creation of formulas using various functions and field values. Learn how to create formulas.
Hide Field: Hides the field from being viewed.
Calculate Type: Allows the selection between Number and String calculations.
Number: Used for calculations involving numerical values.
String: Used for working with text, such as combining names, changing text case, or converting numbers into words.
Now, let's understand the Calculate Type in detail.
1.Number: When selecting Number as the Calculate Type, various mathematical and numerical operations can be performed within the form. Clicking the Create Formula link opens a Create Formula panel, where calculations can be built using Elements and Functions.
Elements: These are the numeric fields created within the form builder, which can be used in calculations.
Functions: These are the predefined operations designed for mathematical calculations, rounding, and date/time differences. Available functions include:
Arithmetic & Rounding Functions:
RoundUp: Rounds a number up to the nearest whole number. e.g.: RoundUp(4.3) → 5.
RoundDown: Rounds a number down to the nearest whole number. e.g.: RoundDown(4.8) → 4.
Round: Rounds a number to the nearest whole number. e.g.: Round (4.5) → 5 or Round (4.4) → 4.
Min, Max, Average: Return the smallest, largest, or mean value from a set of numbers.
Log: Computes the logarithm of a number. e.g.: Log (100) → 2.
Date & Time Functions:
DayDiff: Calculates the difference between two dates in days.
e.g.: DayDiff (2024-01-01, 2024-01-10) → 9days.
MonthDiff: Calculates the difference between two dates in months.
e.g.: MonthDiff (2023-01-01, 2024-01-01) → 12months.
YearDiff: Calculates the difference between two dates in years.
e.g.: YearDiff (2020-01-01, 2024-01-01) → 4years.
HoursDiff: Calculates the difference in hours. e.g.: HoursDiff (10:00 AM, 3:00 PM) → 5hours
MinutesDiff: Calculates the difference in minutes.
e.g.: MinutesDiff (1:00 PM, 1:45 PM) → 45minutes.
DayDiff DD:HH:MM:SS: Displays the difference between two dates in days, hours, minutes, and seconds.
e.g.: DayDiff(2024-01-01, 2024-01-03) → 02:00:00:00.
MonthDiff MM:DD:HH:MM:SS: Displays the difference in months, days, hours, minutes, and seconds.
e.g.: MonthDiff(2024-01-01, 2024-03-01) → 02:00:00:00:00.
YearDiff YY:MM:DD:HH:MM:SS: Displays the difference in years, months, days, hours, minutes, and seconds.
e.g.: YearDiff (2020-01-01, 2024-01-01) → 04:00:00:00:00.
DayOff: Adjusts a given date by adding or subtracting days.
e.g.: DayOff (2024-01-01, +5days) → 2024-01-06.
MonthOff: Adjusts a given date by adding or subtracting months.
e.g.: MonthOff (2024-01-01, +2months) → 2024-03-01.
YearOff: Adjusts a given date by adding or subtracting years.
e.g.: YearOff (2024-01-01, -1year) → 2023-01-01.
2.String: When String is selected as the Calculate Type, an additional section Case Type dropdown automatically appears right below it. This section offers text formatting options such as None, lowercase, Sentence case, and UPPERCASE. These options allow control over the format in which text values are displayed. Once the desired Case Type is selected, clicking the Create Formula link opens the Create Formula panel, where text-based formulas can be built using available Elements and Functions.
Elements: These are the fields created within the form builder that can be used to manipulate text data.
Functions: Provide various text processing operations, including:
Number-to-Word Conversion: This function converts numeric values into words and supports both International and Indian numbering formats.
e.g.: (International Format): Number to Text (9876543) → Nine Million Eight Hundred Seventy-Six Thousand Five Hundred Forty-Three
(Indian Format): Number to Text (9876543, "Indian") → Ninety-Eight Lakh Seventy-Six Thousand Five Hundred Forty-Three
Date & Time Elements: Predefined functions that automatically capture the current date, time, or both when a form is filled out. These values can be used for tracking submissions, calculating deadlines, or setting timestamps.
e.g.: When a user submits a support ticket, the system records the exact date and time of submission.
Output: If a user submits the form on March 24, 2025, at 3:45 PM, the recorded value will be:
Submission Timestamp: 2025-03-24 15:45:00
Text Merging – Combines multiple text fields into a single string, making it useful for dynamically generating full names, addresses, or other combined text values.
e.g.: When a user fills out a registration form, the system merges the First Name, Middle Name, and Last Name to create a full name.
Output: If First Name = John, Middle Name = de, Last Name = Costa, the recorded value will be:
Full Name: John de Costa.
Required Field: This ensures that the users provide necessary information in the field, preventing any important data from being overlooked or omitted.
Font Properties
Field Label Color: Choose or modify the color of the label name.
Field Label Size: Select the label size: Small, Medium, Large, or Custom.
Field Label Style: Apply styles such as Bold or Italic to the label name.
Field Value Color: Modify the color of the field's value.
Field Value Size: Select the field size: Small, Medium, Large, or Custom.
Field Value Style: Apply styles like Bold or Italic to the field value.