|Update Database Record||🔀 action||Update an existing database record|
The Update Database Record component allows you to dynamically update the values in a record or multiple records during a workflow. You can configure it to update the values in a record using something you have typed, or using placeholders.
The Update Database Record component can be combined with the Query Database component to create a powerful combo - the Query Database component can be used to retrieve a list of Record IDs when a certain condition is met, and the Update Database Record component can then update these records. For example, say you want a workflow for updating user details. You identify users based on their email, so you have a form where the user enters their email address, and then the details they want to update. You can use the Query Database to retrieve the Record ID for a certain email (e.g. "firstname.lastname@example.org") and then use the Update Database Record component to update the fields for that user.
Select the database that you want to update from the dropdown.
Click Get Data to retrieve the columns from that database.
Type in the Record ID you want to update, or insert a placeholder which will contain a Record ID. If you type in a Record ID, you can click Get Data again to retrieve the data from that column.
make sure to only tick the columns that you want to update.
Make sure that all columns you do not want to update are not ticked - if a column is ticked but has no value specified in the textfield, it will be updated to be empty.
Configure the update values for each column. You can manually type something in, insert a placeholder, or do both.
Once you have configured the update, save the component.
If you have a list of Record IDs stored as a list type placeholder, you can also pass this into the Record ID textfield. The Update Database Record component will then update all valid Record IDs in that list.
If a Record ID in a list of Record IDs cannot be found, the component will stop and register an error.
The Update Database Record component will attempt to update as much of a record as it can - if an error is encountered when updating a particular column in a record, it will continue to update the other columns.