Skip to content

Database Action

The Database Action creates, updates and deletes records from a local or external database table. Use it to store data or log submissions.

Create Record

Creates or updates a database table record.

SettingDescriptionRequiredDynamic
DatabaseThe name of the database to which to connect.
Custom ConnectionAllows overriding the system default database connection.
-- HostThe server host IP or address to which to connect, e.g. 127.0.0.1.
-- PortThe port to use for the connection, e.g. 3306.
-- CredsThe username & password which to use for the connection.
TableThe name of the database Table to which to connect.
Update RecordShould a record be updated instead of created.
-- Associative KeyThe table column key that will be used to associate the record.
-- Associative ValueThe table column value that will be used to associate the record.
ContentThe mapping configuration of the submission data to the table columns.
Advanced
Action NameThe name to reference this action.
StatusDefines if the action is enabled or disabled.
ExecutionA composed condition that must be met in order for the action to be executed.

Once the basic configuration has been set, the resource fields will load for mapping. The mapping will determine the value that each resource field will be created or updated with. Each field can be mapped to a static or dynamic value.

Save to Action Mapping

Most mapping is optional

In fact, mapping is disabled by default and must be enabled for each field by clicking on the last toggle icon.

When the Update Record setting is enabled the submitted data will override an existing table record determined by the association configuration. If no associated record is found, a new record will be created instead.

SaveToDatabase Action Update

An example to understand the association is to think of a Users Table with an ID column as its primary key. In such a scenario, the submission data should contain the user_id value representing the user row being updated, the Associative Key should be set as ID, and the Associative Value mapped to the Form Submission user_id.

Delete Record

Deletes a database table record.

SettingDescriptionRequiredDynamic
DatabaseThe name of the database to which to connect.
Custom ConnectionAllows overriding the system default database connection.
-- HostThe server host IP or address to which to connect, e.g. 127.0.0.1.
-- PortThe port to use for the connection, e.g. 3306.
-- CredsThe username & password which to use for the connection.
TableThe name of the database Table to which to connect.
Advanced
Action NameThe name to reference this action.
StatusDefines if the action is enabled or disabled.
ExecutionA composed condition that must be met in order for the action to be executed.