[Navigation] Global Search > Utilities > Form Builder
[Accordion] Overview
Formulas bring your forms to life by making them dynamic, intelligent, and responsive. They automatically set values, adjust field behavior, and control visibility based on defined conditions, allowing forms to adapt in real time to the information entered, and guide users smoothly through the process.
Formulas can be applied to a wide range of Form Builder fields, including TextBox, Dropdown, Date, Numeric, and other supported controls, allowing your forms to respond intelligently to user input.
Depending on your needs, you can choose between:
- Basic (Rule-Based) Formulas: Ideal for simple, guided logic.
- Custom Formulas: Designed for advanced expressions and more complex logic.
This article covers the core concepts and explains when and how to use each option.
[Accordion] Getting Started
Formulas are configured at the field level in the Properties panel under Formula Settings. You can define calculation logic using values from other fields on the form. Once configured, the formula automatically evaluates and populates the field, ensuring accurate calculations and consistent data across records.
Available formula types include:
- Data Formula: Auto-populate or calculate a field’s value.
- Color Formula: Change the field color dynamically based on conditions.
- Required Formula: Make a field conditionally required.
- Field Visibility: Show or hide fields based on defined logic.
All formula types open the same Configure Formula interface. This unified interface allows you to define, edit, and manage calculation logic consistently, regardless of the selected formula type, ensuring a standardized and intuitive configuration experience.
[Accordion] Using Basic (Rule-Based) Formulas
The Build Formula tab provides a no-code, rule-based way to create formulas.
How It Works
You can define the logic using a simple structure: When > Criteria > Value > Then
Typical Steps:
- Click/Tap Add Formula next to the desired formula type.
- From the Build Formula tab, select + Add New.
- When: Select a field from the current form.
- Criteria: Apply an operator (equals, greater than, contains, etc.).
- Value: Define the value or action when the condition is true.
- Else (Display Value) when the condition is false.
- Click/Tap [[img:verified_user >> lbl:Validate Formula]] Validate Formula, then enter an example value. to test and confirm that the formula is working correctly.
- Click/Tap [[img:check >> lbl:Accept >> bg:#5fb152]] Accept.
Best For:
- Simple conditional logic
- Field-to-field comparisons
- Quick setup without writing expressions
[Accordion] Using the Custom Formula Editor
The Custom Formula Editor offers advanced control and flexibility for building and managing complex logic.
What Makes It Powerful
In addition to the fields on the current form, you can reference:
- Linked data source tables
- Environment variables, such as:
- Logged-in user
- Current date
- System context
- Pre-defined formula samples (right panel)
CASE
WHEN condition THEN value
WHEN condition THEN value
ELSE default_value
END[Accordion] Formula Samples Panel
The right-side Formula Samples panel includes ready-to-use examples such as:
- Arithmetic operations (Add, Subtract, Multiply, Divide)
- Absolute values
- Rounding
- Maximum/frequency calculations
- Date formatting
[Note] You can click/tap or copy these samples and modify them to suit your needs.
When to Use Each Approach
| Scenario | Recommended Method |
| Simple conditional logic | Build Formula |
| Field comparisons | Build Formula |
| Calculations | Custom Formula Editor |
| Date-based logic | Custom Formula Editor |
| Using environment variables | Custom Formula Editor |
| Multi-condition logic | Custom Formula Editor |
[Accordion] Validating and Saving Formulas
Before saving any formula:
- Click/Tap [[img:verified_user >> lbl:Validate Formula]] Validate Formula to check for errors.
- Review the output logic carefully.
- Click/Tap [[img:check >> lbl:Accept >> bg:#5fb152]] Accept to apply.
- Use [[img:cancel >> lbl:Clear >> bg:grey]] Clear if you need to reset.
- Use [[img:close >> lbl:Cancel >> bg:grey]] Cancel to exit without saving.
[Note] Validation helps prevent runtime errors and unexpected behavior
[Accordion] Best Practices
- Start simple: Build and test basic logic first, then layer in additional conditions as needed to reduce errors
- Use clear, consistent field names: Meaningful names make formulas easier to read, understand, and maintain
- Test often: Use the [[img:verified_user >> lbl:Validate Formula]] option with sample values to confirm results at each step
- Handle all scenarios: Include default conditions (e.g.,
ELSEstatements) to prevent unexpected or blank results - Avoid overly complex formulas: Break complex logic into multiple calculated fields when possible for readability and easier troubleshooting
- Document your logic: Add notes or comments to explain the purpose of complex formulas
- Verify field types: Ensure referenced fields use compatible data types (numeric, text, date) to avoid errors
- Review after changes: Re-test formulas whenever related fields or form logic are updated