Update Fields in Table Action

This action allows you to modify an existing record in a table

Updated over a week ago

The Update fields in Table action allows you to edit one or more records in a specified table.

NOTE: This action is for updating records which already exist. If you wish to create a brand new record via an action, you will need to use Insert Records into Table.

This action, once completed, is permanent. There is no way to undo any changes this action does.

NOTE: This action isn't the only way to update a record in a Method table (often, the Save All action is used to save a record from a user-facing screen).



Select a table

The table holding the records to update.

Update records where

Specifies how to select which record or records to update within the table. This is done using the criteria builder.

Field(s) to update

Choose one or more field(s) which will be updated.

Update using this value

Specify the values to update each field. This can be manually entered or pulled from a control, session variable, or an action result.

Example Scenario

In this scenario, we are customizing the activities list. A checkbox column has been added to the activities grid and we want a button to set all the selected activities as completed.

A button has been dragged onto the screen and labelled "Set selected Activities to Completed". In its Click Event, there are two actions:

  • Loop Through Grid: This action will loop through the grid, but only through the records which have been checked. For more information on this action, please see our article Loop Through Grid.

  • Update Fields in Table: This action will update the the ActivitiesStatus field which we will cover in detail below. 

When selected, the Update Fields in Table action has been configured as shown below:

  • Select a table: the Activity table has been selected since we hope to complete activities.

  • Update records where: In this given example, this will go through each selected record in the grid. The criteria will then do a comparison: does the RecordID that we are currently looping through match a record in the Activity table?

  • Field(s) to update: If the criteria results in true, in other words, if the RecordID of a record is either 143, 144, or 146, then that record will have its ActivityStatus field updated. 

  • Update using this value: We want this activity to be set to complete, so we set the ActivitiyStatus field to "Completed", which we have manually typed in.  

To explain it plainly, this is what happens when a user clicks the "Complete Selected Activities" button.:

  1. Loop through the grid searching for records which have been checked.

  2. The first record in the looped-through grid is 143. 

  3. In the action Update Fields in Table, it finds the record with the RecordID 143 in the Activity Table

  4. Once found, it then updates this record's ActivityStatus field with the text "Completed".

  5. The above is now complete so we continue through the loop and find the next checked record, 144. 

  6. Repeat the Update Fields in Table action again for this grid row, this time looking for the RecordID 144 in the Activity Table. 

  7. Once found, this record's ActivityStatus field is updated to "Completed". 

  8. Continue through the loop. 145 is skipped because it isn't checked but the next is: RecordID 146.

  9. Repeat the Update Fields in Table action again for this grid row, this time looking for the RecordID 146 in the Activity Table.

  10. Once found, this record's ActivityStatus field is updated to "Completed".

  11. This action is complete so we return back to the loop, but there are no more checked rows in the grid, so the action set ends!

The two activities are now completed. There are a number of ways you can improve this process, but the main point of this example is to showcase the Update Fields in Table action. 

However, for those of you who are interested in making this user friendly:

  • Consider a confirmation message to make sure the user wishes to make this change.

  • Consider a completion message to make sure the user knows the process is complete. 

  • Refresh the grid to reflect changes. 

Did this answer your question?