Bulk row update and delete
When no rows are selected, an IN filter based on selectedRows.data resolves to an empty array. UI Bakery removes empty filters from the generated WHERE clause. It does not treat IN [] as a condition that matches zero rows.
Always validate the selected rows before running Bulk Update or Bulk Delete.
Bulk row update
Follow the instructions below to configure bulk table rows update:
Select the Table component and navigate to the Row selection section in the right-side panel.
There, select the Enable multiple rows selection checkbox.

Create a new Condition action step and specify the following code:
return {{ui.table.selectedRows.data.length>0}};For the if condition, add the Update Row action:
In the Filters section, specify the identifier for updated records (we'll use row_number_id) -
row_number_id in {{ui.table.selectedRows.data.map(item => item.row_number_id)}}.In the Configure row section, specify the parameter that will be updated (in our example, the record's status will change to Active).
Select the Bulk Update checkbox.

(Optional) For the else condition, you can configure an error notification.
As a second step, add the Execute Action step and select the action that loads your data to display the updated values in the table.
Add a toggle or button to the canvas and assign the bulk update action to its On Change/On Click trigger.
Bulk row delete
The flow here is similar to that of the Bulk update one:
Repeat steps 1-4(a) from the Bulk update instruction above.
For the if condition, select the Bulk Delete checkbox.
(Optional) For the else condition, you can configure an error notification.
As a second step, add the Execute Action step and select the action that loads your data to display the updated values in the table.
Add a button to the canvas and assign the bulk delete action to its On Click trigger.
Prevent repeated execution
When a button triggers a bulk action, disable it while no rows are selected or while the action is running:
This reduces repeated execution while the action is running. Keep the Condition step as the main validation because the button state alone does not protect the database from an empty filter.
Last updated
Was this helpful?