Batch Operations, Logging, and Delete Tracking
Transcript Summary
Introduction
What's up, databasers? Sam here, and in this video, I'm going to talk all about additional table options, which include batch operations, change logs, and delete tracking. Let's hop right into it.
Batch Operations
Here in the Builder, I have an app that includes students, grades, and courses. The first thing I want to talk about is batch operations. You'll see it right here at the top.
Use Case: Updating Records in Bulk
Let's say I imported students into the system, and some have more information, while others do not. For example, the status field might be blank for some new students. Instead of updating each record individually, I want to update all records with a blank status to "active" at the same time.
To do this, I’ll go to batch operations, select “Update,” and set a condition for records where the status is blank. I’ll then update the status field to "active" for those records.
Rapid Update Option
There’s also an option called "enable rapid update." When you have fields based on equations, such as a percentage calculated from a number field, rapid update allows these equations to update behind the scenes, while updating the number field instantly.
Important Notes
- Batch operations do not trigger table rules. For instance, if you have a rule that updates a "last edited" field when a record is updated, batch operations will bypass this rule. You would need to use a task instead to trigger table rules.
Multi-Select Updates
In addition to batch operations, you can also select multiple records manually and update them. This only affects the selected records, not the entire table. For example, you can select 10 records on the page and perform an update.
Batch Delete
Batch delete works similarly to batch operations, but instead of updating records, you delete them. For example, I can add a condition to delete all student records where the profile is blank and the role is "student."
Front-End Batch Operations
Batch operations and deletes can also be enabled for end users in the live app. This allows users to update or delete multiple records directly from the front end.
Log Tracking and Delete Tracking
To enable record and delete tracking, go into the settings of the table. Under "record tracking," enable options to log record changes and deleted records. Once enabled, you’ll see icons on the table indicating record and delete history.
- Record History: You can view details like who created or edited the record, along with the IP address and timestamp.
- Delete History: Shows who deleted the record, when it was deleted, and through which action (e.g., a delete button).
Viewing Logs in the Live App
In the live app, users can also view record and delete histories. This includes details like who created, edited, or deleted the record, along with timestamps and other relevant data.
App-Level Logs
In the app settings, there’s a dedicated logs section where you can view various logs, including:
- Change Logs: Tracks changes made to the app, like page views and edits.
- Task Logs and Backups: Allows you to create backups and view import logs, showing which files were updated.
- Record Logs: Displays change logs, delete logs, and debug logs, providing insight into changes made to records.
Conclusion
I hope this video helped you understand batch operations, record tracking, delete tracking, and logs in general. Thanks for watching!
We'd love to hear your feedback.