Form actions
Action types
Forms can do the following actions, many of which are described in detail below:
- Save a record
- Clear fields and start a new record
- Show dialog
- Go to a form page
- Change widget state
- Change widget input validation
- Set a value
- Send alert
Firing actions
Actions are fired from a variety of user interactions:
- Button click
- Single field widget value change
- Page or Dialog display
- Record list action button
- Dialog continue action
For example, you can choose to run actions whenever a page is first displayed. To do this, click the page's "Page Display Actions" button.
Page display actions are great for setting a widget's initial state or input validation. In this example we're setting the Address field to either Editable or Disabled based on data that has been entered on a different page.
The "current record"
Every form has a concept of a "current record". This is the main dataset record that the form is working with. For simple surveys, each question fills in a field for the "current record." Forms that edit records often start with a record list widget that lists many records from a dataset. When you click on a record to go to another page to edit it, that action sets the "current record" to be the record that you chose. For more information see the Overview of Forms article.
Form variables
Forms can use temporary variables in addition to "current record" fields. These variables maintain their values while the form is being used and enable complex workflows without requiring temporary dataset fields. Variables are created through the "Set Variables" button when editing a form.
Like dataset fields, each form variable has a name and data type information. Unlike dataset fields, form variables have optional default values. For example, a "Commission Percentage" variable with a default of 35% can be referenced in equations throughout a form without needing to be its own dataset field. When form actions update this variable, all references to it automatically reflect the new value.
The Dataset Record type is particularly powerful—it stores an entire record from any dataset, not just a single field value. This enables forms to load, modify, and save complete records behind the scenes without displaying them to users.
For example, a "Last Customer Entered" variable can streamline data entry in a New Customer form. When someone creates a new customer, an action saves both the record and stores it in this variable. The next time the form opens, it checks if this variable contains data and pre-fills relevant fields (like country and customer service rep) from the previous entry. Since form variables persist throughout the user's session, this information remains available even when navigating between different records.
Using form variables is simple because you can reference form variables anywhere you can reference form fields. They appear in a dedicated section at the bottom of field selection dropdowns throughout the form in widgets, conditions, equations, and actions. They provide temporary storage for UI controls, intermediate calculations, and data that doesn't need to be saved to the dataset.
Form logic
Clicking a button or changing a single field widget value doesn't have to fire the same action every time a user interacts with the form. You can develop complex AND/OR and IF/ELSE logic to do different actions based on the form's data or what the user does as they're filling out the form. This allows you to build forms that change and update as users interact with them.
IF statements
The most common IF statement is one that references a single "current value" field or form variable. The types of comparisons you can make depend on the data type of the value you choose, but here are some examples.
Rather than a single field, you can also choose the "Equation is True" condition, enabling complex logic involving multiple fields.
When you click "Set Equation," the equation builder opens in a second-level dialog. You can build equations that include data from these three "type" options:
- Current Record (default) - allows selecting fields from the form's dataset or any linked dataset
- Form Variable - lists available form variables
- Dataset - provides aggregated data from any dataset
Equations in IF statements allow you to create multi-field conditions like ensuring a Case Report Date comes after an Incident Date, or verifying that at least one checkbox from a group is selected. In this example we’re checking to see if both the employee and manager names are blank.
By referencing values from other datasets, forms can adapt their behavior based on external data - for example, displaying different content based on whether your website status is "up" or "down" (stored in another dataset), or limiting form submissions to the first 50 entries by checking a count from the dataset. In this example we’re looking up the current Australian to US exchange rate from another dataset and changing form behavior based on whether or not it’s higher than 1.
"Set a value" action
The "Set a value" action supports setting:
- Any current record field
- Any form variable
- The entire current record
Setting single values
When setting a current record field or standard form variable, there are a variety of things you can set the value to like blank, a specific value you type in, another form value, the current date/time, or various pieces of information about the current user.
You can also choose to set a field to "Result of Equation".
The equation builder for setting a value is exactly the same as "Equation is True" IF statements, allowing you to reference the current record, form variables, or aggregated dataset data. This functionality makes it possible to generate record IDs by combining fields or incrementing existing IDs, calculate dates, auto-populate fields based on user permissions, or aggregate values that can't be handled by standard calculated fields.
Setting entire records
When you choose to set either the "Entire Current Record" or to set Dataset Record a form variable, there are three different options to choose from:
- Blank
- Load Record from ID
- Replace with Another Form Variable
Choosing "Replace with Another Form Variable" allows you to copy all field values between Dataset Record form variables or the "current record". The software ensures type compatibility - Dataset Record variables can only be replaced with records from the same dataset.
Loading records from a dataset
When you choose to "Load Record from ID," you choose which field or variable contains the ID to use for the lookup.
You can use any value as the ID to look up, but it's important to note that it retrieves the matching record by its Record ID only. That's because we need a single record here, and the record ID is the only field guaranteed to be unique. The software will just take whatever value you give it, and will try to find a record with that ID. If no matching record is found, the record or variable is set to blank.
Loading the current record or a dataset record variable from ID enables powerful scenarios like preventing duplicate form submissions, or dynamically loading related records based on form input.
"Save a record" action
The "Save a record" action allows you to save either the current record or any Dataset Record variable. This enables creating and saving records in other datasets behind the scenes - perfect for audit trails or multi-dataset workflows.
Example Form Workflows
Auto-loading user records
Forms can default to showing a user's own record without requiring selection. For example, an employee info form can automatically load and display the current user's employee record when they visit the form.
Preventing duplicate submissions
Combine form variables, Load from ID, and conditional logic to ensure users can only submit one record per time period:
- On form load, use Load from ID to check for an existing record matching the current user
- If found, load that record for editing instead of creating a new one
- Use equation-based conditions to validate that dates fall within allowed ranges
Creating audit trails
Use Dataset Record variables and the Save a record action to maintain audit logs that capture form activity:
- Create a Dataset Record variable linked to your audit dataset
- Use "Set a value" actions to populate audit fields as the form progresses - timestamp with "Current Date", user with "Current User", and record ID with the form's record ID
- Use equations to dynamically build the action description based on form values - for example, "Updated customer [Customer Name] address from [Original City] to [New City]"
- When saving the main record, use a second "Save a record" action to save the populated audit record to the audit dataset
- The audit dataset now contains a detailed log of what changed, when, and who made the change
Dataset Record variables enable forms to manipulate complete records from any dataset without showing them to users. Unlike individual field variables, these store entire records with all their data, enabling sophisticated workflows that operate behind the scenes.
Dataset Record variables enable multi-dataset workflows, where a single form submission can create or update records across multiple datasets simultaneously, and record templating, where forms can load existing records as starting points for new ones.
Complex data validation
Leverage equations in IF statements for multi-field validation:
- Check that related date fields are in the correct sequence
- Ensure at least one option from a group of checkboxes is selected
- Validate that numeric fields sum to an acceptable total
- Display specific error messages in dialogs that remain open until issues are resolved
Dynamic form behavior based on permissions
Combine permission filtering with form logic:
- Rollup fields automatically show only the portions of the hierarchy users can access
- When users have permission to only one item, it's pre-selected
- Form behavior adapts based on whether users have view-only or edit permissions
- Dialogs open in appropriate modes based on user access levels