Automate Calculations in eSignature Documents with Formula Fields

BoldSignBoldSign
9 min read

A formula field is a type of form field, similar to a signature field, but designed for automated calculations. It serves multiple purposes by enabling easy computation of numeric and date-based values. With formula fields, various calculation-based tasks become more efficient, reducing manual effort and errors. This feature significantly enhances usability and workflow automation.

In this blog, we will explore formula fields in detail, including their advantages; supported form fields, operators, and functions; and step-by-step configuration.

What Are Formula Fields in eSignatures?

Formula fields automatically perform calculations using predefined expressions, eliminating the need for manual input and enabling real-time data computation. They can be used to automate tasks such as invoice calculations, age determination, and discount applications.

These fields support numeric calculations, date-based computations, and conditional logic (e.g., applying discounts based on purchase amount). Before creating a formula, it is important to understand the supported form fields, operators, and functions that enable these calculations.

Supported Form Fields for Formula Calculations

In BoldSign, certain form fields support automated calculations, provided they are configured correctly to ensure accurate results:

Text Box: To use a text box in formulas, it must be set to accept only numeric values. Enabling the Only Numbers validation ensures that calculations work without errors.

Dropdown: When using a dropdown field in formulas, its options must be defined as numeric values. This allows users to select predefined numbers that can be directly used in calculations.

Date Fields (Date Picker and Editable Date): These fields enable date-based calculations, such as finding the difference between two dates. The date-picker provides a structured, preformatted input, whereas the editable date field allows manual entries, which must follow a proper date format for accurate calculations.

Features and Capabilities of Formula Fields

Formula fields in BoldSign support a variety of operators and functions, enabling users to automate calculations, validate data, and apply conditional logic. These capabilities help streamline document workflows.

Mathematical Operations

Formula fields support basic arithmetic operations such as addition, subtraction, multiplication, and division. These operations are essential for automating calculations like financial computations, tax calculations, and percentage-based evaluations.

OperatorFormulaDescriptionExample
+ (Addition)[TextBox1] + [TextBox2]Adds two numeric values.If TextBox1 = 100 and TextBox2 = 50, Result = 150
– (Subtraction)[TextBox1] – [TextBox2]Subtracts one value from another.If TextBox1 = 200 and TextBox2 = 50, Result = 150
*(Multiplication)[TextBox1] * [TextBox2]Multiplies two values.If TextBox1 = 5 and TextBox2 = 10, Result = 50
/ (Division)[TextBox1] / [TextBox2]Divides one value by another.If TextBox1 = 100 and TextBox2 = 4, Result = 25

Date Calculations

Formula fields enable date-based calculations, helping automate scheduling, due dates, and expiration timelines. The following table lists the available functions for date calculations.

FunctionDescriptionExample
Year(date)Extracts the year from a date.Year([DatePicker1]) → If DatePicker1 = 2024-06-15, Result = 2024
Month(date)Extracts the month from a date (1–12).Month([DatePicker1]) → If DatePicker1 = 2024-06-15, Result = 6
Day(date)Extracts the day from a date.Day([DatePicker1]) → If DatePicker1 = 2024-06-15, Result = 15
DateDiff(end_date, start_date)Calculates the number of days between two dates.DateDiff([DatePicker1], [EditableDate]) → If DatePicker1 = 2024-06-20 and EditableDate = 2024-06-10, Result = 10 days
AddYears(date, number of years)Adds a specific number of years to a date.AddYears([DatePicker1], 2) → If DatePicker1 = 2024-06-15, Result = 2026-06-15
AddMonths(date, number of months)Adds a specific number of months to a date.AddMonths([DatePicker1], 6) → If DatePicker1 = 2024-06-15, Result = 2024-12-15
AddDays(date, number of days)Adds a specific number of days to a date.AddDays([DatePicker1], 10) → If DatePicker1 = 2024-06-15, Result = 2024-06-25

Conditional Logic

Conditional operators help evaluate relationships between values, ensuring field visibility and logical decision-making. The following tables list the available operators and functions for conditional logic.

Operators

OperatorFormulaDescriptionExample
\> (Greater Than)[TextBox1] > [TextBox2]Checks if one value is greater than another.If TextBox1 = 100 and TextBox2 = 50, Result = true
< (Less Than)[TextBox1] < [TextBox2]Checks if one value is less than another.If TextBox1 = 30 and TextBox2 = 50, Result = true
\>= (Greater Than or Equal To)[TextBox1] >= [TextBox2]Checks if one value is greater than or equal to another.If TextBox1 = 50 and TextBox2 = 50, Result = true
<= (Less Than or Equal To)[TextBox1] <= [TextBox2]Checks if one value is less than or equal to another.If TextBox1 = 50 and TextBox2 = 50, Result = true

Function

FunctionDescriptionExample
If (condition, true_result, false_result)Checks a condition and returns one value if the condition is true and another value if it is false.If TextBox1 = 120 and TextBox2 = 80: If([TextBox1] > 100, [TextBox1], [TextBox2]) → Since 120 is greater than 100, the function returns 120.

Data Validation and Formatting

Logical operators allow users to combine multiple conditions for data validation and formatting. The following tables list the available operators and functions for data validation and formatting.

Operators

OperatorFormulaDescriptionExample
&& (AND)[TextBox1] > 100 && [Dropdown1] > 50Returns true only if both conditions are met.If TextBox1 = 150 and Dropdown1 = 60: [TextBox1] > 100 && [Dropdown1] > 50 → Result = true
(OR)[TextBox1] > 100[Dropdown1] > 50Returns true if at least one of the conditions is true.If TextBox1 = 150 and Dropdown1 = 40: [TextBox1] > 100[Dropdown1] > 50 → Result = true

Functions

FunctionDescriptionExample
Floor(number)Removes the decimal part of a number and gives you the first whole number.If TextBox1 = 7, then Floor([TextBox1] / 2) → 7 / 2 = 3.5, and removing the decimal part gives 3.
Ceil(number)Increases the number to the next whole number if it has any decimal part.If TextBox1 = 25, then Ceil([TextBox1] / 3) → 25 / 3 = 8.33, and moving to the next whole number gives 9.

Step-by-Step Guide: Using Formula Fields in BoldSign

To configure formula fields in BoldSign:

  1. Log in to your BoldSign account. If you don’t have an account, create one.

  2. On the Dashboard page, click Create New and select Create New Document to start the process.

Create New Document option

Create New Document option

3. Fill in the necessary details on the Prepare document for signing page and click Next.

Next button

Next button

4. On the Configure fields page:

  • Add required form fields such as text boxes, dropdowns, or date pickers before adding a formula field.

  • Assign meaningful field IDs to make formula creation easier.

Form field ID

Form field ID

  • Ensure that fields used for calculations (like text boxes and dropdowns) contain only numerical values.

Only Numbers validation option

Only Numbers validation option

5. Drag the Formula field onto the document where the calculated value should appear.

Formula form field

Formula form field

6. Enter a formula field ID and click Set Formula to open the Formula Builder.

Set Formula button

Set Formula button

7. Use supported fields, operators, and functions to create the formula.

Set formula

Set formula

8. Validate the formula to check for errors and click Save.

9. Click Preview to test whether the formula calculates correctly before finalizing the document.

Preview button

Preview button

Implementing Conditional Logic for Formula Fields

Conditional logic helps control field visibility based on user input. For instance, consider a scenario where a registration form includes an offer field that should only be visible if the customer purchases more than five tickets. By using conditional logic in formula fields, you can ensure that the offer field appears only when this condition is met.

To configure this:

  1. Add the supporting form field for the offers onto the document and specify the offers.

  2. Drag and drop the Formula Field into the required position.

  3. Enter a formula field ID and click Set Formula to open the Formula Builder.

  4. Use supported fields, operators, and functions to create the formula for more than a 5-unit selection and Save it.

Set formula

Set formula

5. Next, move to the Conditional Logic section and click Create Logic.

Create Logic button

Create Logic button

6. Define conditions:

  • True Condition: Field is visible if the formula evaluates to 1.

  • False Condition: Field remains hidden if the formula evaluates to 0.

  • Numeric Values: Field appears only if the formula meets a specific value.

This setup ensures that the field remains hidden unless the defined condition is met.

7. Set the rule and apply. Then click Preview to test whether the rule functions correctly.

For more information on implementing conditional logic, check out our tutorial video on formula fields and our help article on how to use and configure formula fields.

Use Cases in Various Industries

Formula fields in BoldSign offer flexibility and automation that cater to a variety of industries, giving them accurate calculations and seamless workflows:

  • Finance and Accounting: Automate tax calculations, interest computations, and expense approvals using arithmetic operations and conditional logic.

  • Healthcare: Validate patient data, calculate medication dosages, and determine billing amounts based on service duration.

  • Real Estate: Auto-calculate lease durations, rent adjustments, and mortgage payments with date and mathematical functions.

  • Human Resources: Manage salary breakdowns, calculate leave balances, and validate employee data in offer letters and contracts.

  • Legal and Compliance: Ensure document validity by calculating expiration dates, enforcing conditional clauses, and validating signer inputs.

  • Retail and E-Commerce: Apply discount calculations, total order values, and tax computations directly within contracts and invoices.

Formula fields enhance efficiency, reduce manual errors, and standardize document processes across multiple industries.

Benefits of Using Formula Fields

  • Automation and Efficiency: Formula fields automate calculations, streamlining processes and saving time by eliminating the need for manual data entry and repetitive tasks.

  • Error Reduction: By automatically calculations based on predefined formulas, the risk of human error is significantly minimized, ensuring greater accuracy in documents.

  • Real-Time Data Adjustments: These fields automatically update as soon as related values change, ensuring that data remains current and accurate without additional intervention.

  • Wide Range of Applications: Formula fields are versatile and can be applied to various use cases, such as financial calculations, date manipulations, and logical conditions, making them adaptable to diverse business requirements.

  • Enhanced Workflow Consistency: Using standardized formulas helps maintain consistency across documents, ensuring uniformity in calculations and data presentation.

Conclusion

Formula fields in BoldSign offer a powerful way to automate calculations and manage document workflows with precision. By using supported operators, functions, and conditional logic, users can ensure accuracy, streamline processes, and enhance the efficiency of digital document management.

Have questions or feedback? Share them in the comments section below. For more details, feel free to schedule a personalized demo or contact our support team via our support portal.

0
Subscribe to my newsletter

Read articles from BoldSign directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

BoldSign
BoldSign

BoldSign is a secure, legally compliant e-signature solution for businesses and individuals. It simplifies document signing with a user-friendly platform and powerful API & SDK for easy integration. Send, sign, and manage contracts effortlessly.