Batch Updates and Deletes
When working with multiple records in your DataTable, you can save time by performing batch operations to update or delete several records at once. These powerful features allow you to make changes across multiple records simultaneously, streamlining your data management workflow.
What You'll Learn
In this section, you'll discover how to efficiently manage multiple records using batch operations. We'll cover selecting multiple records, updating common fields across several entries, and safely deleting multiple records, essential skills that help you maintain your data more efficiently and reduce repetitive tasks.
Batch Updates
Batch updates allow you to modify the same field or fields across multiple selected records simultaneously. This feature is particularly useful when you need to update status fields, categories, or other common attributes for several records at once.
Performing Batch Updates
To update multiple records at once:
- Navigate to the Records tab in your DataTable
- Select the records you want to update by checking the boxes next to each record
- Once you have selected one or more records, batch operation options will become available
- Click the batch update or delete option to open their dialogs
- Choose the fields you want to update or delete from the available options
- Set the new values for the selected fields (when updating)
- Click "Update" to apply the changes to all selected records, or confirm the deletion
The batch dialog presents you with all the available fields from your table. You can choose to update (or delete) one or multiple fields simultaneously. For each field you want to modify, simply select the field and enter the new value that should be applied to all selected records.



Batch updates are perfect for updating status fields, assigning categories, or making other standardized changes across multiple records. This saves significant time compared to editing each record individually.
The batch update operation will overwrite the existing values in the selected fields for all chosen records. Make sure to review your selections carefully before confirming the update.
Record Selection Behavior
Understanding how record selection works in batch operations is important for managing your data effectively. Knack provides flexible selection options that adapt to different scenarios and data sizes.
All Records on This Page vs All Records in Data Table
When working with batch operations, you have two primary selection modes, in addition to selecting individual records:
All records on this page: This selection mode applies your batch operation only to the records currently visible on your screen. This is the default behavior when you select the uppermost checkbox "select all" option in the header row.
All records in data table: This selection mode applies your batch operation to all records in your table that match your current filters (if applied), even if they're not currently visible on your screen. This is particularly useful for large datasets where you want to perform operations across the entire table.

Dynamic Selection Behavior
The selection behavior adapts intelligently based on your actions:
When you initially choose "All records in data table," the system prepares to work with your entire dataset. However, if you then deselect one or more individual records, the system automatically switches to "All records shown on page" behavior. This happens because once you've made specific exclusions, the operation becomes more precise and focuses on the records you can see and manage directly.
This adaptive behavior ensures optimal performance while giving you the control you need.
When to Use Each Selection Mode
Use "All records shown on page" when:
- You want to work with a specific subset of records you can see
- You've applied filters to show exactly the records you want to modify
- You're working with a manageable number of records
- You want to exclude specific records from the operation
Use "All records in data table" when:
- You want to apply changes to your entire dataset
- You're working with large tables where scrolling through all records isn't practical
- You want to use conditional filtering to target specific records across the entire table
- You're performing maintenance operations that should affect all matching records
Conditional Filtering for Batch Operations
When you select "All records in data table" for either batch updates or batch deletes, you gain access to powerful conditional filtering options. This feature allows you to specify exactly which records should be affected by your batch operation, even across large datasets.
How Conditional Filtering Works
Conditional filtering lets you define criteria that records must meet to be included in your batch operation. Instead of manually selecting individual records, you can set up rules that automatically identify the records you want to modify or delete.
For example, you might want to:
- Update all records where the status is "Pending" to "In Progress"
- Delete all records created before a specific date
- Update all records in a particular category with new information
- Remove all records that meet multiple criteria simultaneously
Setting Up Conditional Filters
When you choose "All on Table" for a batch operation, you'll see additional options for setting up conditions:
- Field Selection: Choose which field you want to use as the basis for your condition
- Condition Type: Select the type of comparison (equals, contains, greater than, less than, etc.)
- Value: Specify the value that records must match or compare against
- Multiple Conditions: Add additional conditions using AND/OR logic to create more complex rules



Benefits of Conditional Filtering
Conditional filtering provides several advantages for managing your data:
Precision: You can target exactly the records that need to be changed without manually reviewing each one.
Efficiency: Large-scale operations can be performed quickly without having to load and select individual records.
Consistency: Automated filtering reduces the risk of missing records or making inconsistent changes.
Scalability: The approach works equally well whether you're working with hundreds or thousands of records.
Best Practices for Conditional Filtering
To make the most effective use of conditional filtering:
Test Your Conditions: Before running a large batch operation, consider testing your conditions on a smaller subset or using the table's filter feature to preview which records will be affected.
Use Specific Criteria: The more specific your conditions, the more predictable your results will be. Avoid overly broad conditions that might affect unintended records.
Document Your Logic: For complex conditions involving multiple criteria, document what you're trying to achieve so you can replicate or modify the operation later.
Review Before Executing: Always review the conditions you've set up before confirming the batch operation, especially for delete operations.
Examples of Conditional Filtering
Here are some practical examples of how you might use conditional filtering:
Status Updates: Update all records where "Status" equals "Draft" to "Under Review" - useful for moving projects through workflow stages.
Data Cleanup: Delete all records where "Created Date" is older than one year and "Status" equals "Completed" - helpful for archiving old data.
Category Changes: Update all records where "Department" equals "Marketing" to have "Budget Category" set to "Promotional" - useful for organizational restructuring.
Bulk Corrections: Update all records where "Region" contains "East" to have "Time Zone" set to "Eastern" - helpful for correcting data inconsistencies.
Batch Deletes
Batch delete functionality works just like batch updates, except it allows you to permanently delete multiple records from your table simultaneously. This feature includes safety measures to prevent accidental data loss while providing an efficient way to clean up your data.
Performing Batch Deletes
To delete multiple records at once:
- Navigate to the Records tab in your DataTable
- Select the records you want to delete by checking the boxes next to each record
- Once you have selected one or more records, batch operation options will become available
- Click the batch delete option
- Review the confirmation dialog that appears
- Confirm the deletion by clicking "Delete" in the confirmation dialog

The Delete Records confirmation dialog helps prevent accidental data loss
Important: Batch operations cannot be undone. Make sure you have selected the correct records and consider exporting your data before performing large batch deletions or updates.
Safety Considerations for Batch Deletes
When performing batch delete operations, keep these important points in mind:
- Review your selection: Double-check that you have selected only the records you intend to delete
- Connected records: Consider whether the records you're deleting are connected to other tables in your application
- Data backup: For large deletions, consider exporting your data first as a backup
The confirmation dialog provides a final opportunity to review your selection before the deletion is processed. Take advantage of this safety measure to verify your choices.
Best Practices for Batch Operations
To make the most of batch update and delete functionality, consider these best practices:
Planning Your Batch Operations
Before performing batch operations, take time to plan your approach. Consider which records need to be updated or deleted, and whether the changes should be made all at once or in smaller groups. For very large datasets, it may be more manageable to work in batches rather than selecting all records at once.
Decide whether you need to work with "All records on page" or "All records in data table" based on your specific requirements. If you're working with large datasets and want to apply changes across the entire table, "All records in data table" with conditional filtering might be the most efficient approach. Alternatively, you can change pagination to show up to 1,000 at a time.
Using Filters and Conditional Logic
Take advantage of Knack's filtering and sorting capabilities to help identify the records you want to include in your batch operation. You can filter your table view to show only the records that meet specific criteria, making it easier to select the appropriate records for your batch operation.
For large-scale operations, consider using conditional filtering with "All records on data table" selection. This approach allows you to define precise criteria for which records should be affected, without having to manually select individual records. This is particularly powerful for maintenance tasks, data cleanup, and systematic updates across large datasets.
Understanding Selection Behavior
Be aware that the selection behavior adapts based on your actions. If you start with "All records on data table" but then deselect specific records, the system will automatically switch to "All records shown in page" behavior. This ensures optimal performance while giving you the control you need, but it's important to understand this behavior to predict the scope of your operations accurately.
Testing with Small Groups
When you're new to batch operations or working with critical data, consider testing your approach with a small group of records first. This allows you to verify that the operation works as expected before applying it to larger datasets.
Documenting Changes
For important batch operations, especially those affecting many records, consider documenting what changes were made and when. This can be helpful for tracking data modifications and understanding the history of your records.
Troubleshooting Batch Operations
If you encounter issues with batch operations, here are some common solutions:
Selection Behavior Issues
If your batch operation isn't affecting the records you expected:
- Check your selection mode: Remember that selecting "All records on data table" and then deselecting individual records changes the behavior to "All records shown on page"
- Review your filters When the data table has filters applied, batch updates / deletes will look at the filtered set of records only
- Verify conditional filters: If you've set up conditional filtering, double-check that your conditions are correctly configured
- Consider pagination: Remember that "All records shown on page" only affects currently visible records, not records on other pages in the data table
Performance with Large Datasets
For very large batch operations:
- Consider breaking the operation into smaller groups
- Allow extra time for the operation to complete
- Monitor the progress and be patient with larger datasets
- Use conditional filtering to target specific subsets rather than processing all records at once
Note: Batch operations are processed on Knack's servers, so larger operations may take some time to complete. The system will provide feedback on the progress of your operation.
Understanding these related features can help you create a more comprehensive data management strategy for your application.
Updated 5 days ago