How to Archive Records Using Role Permissions | INTERMEDIATE
Sometimes you create records in an app which you no longer wish to see. Often times the reflex is to delete records. However, if records are deleted in error or you change your mind at a later date, there is no way to bring those records back…they’re gone forever.
In this article we’ll demonstrate how avoid these issues using archiving. Specifically how to archive records using role permissions.
Some cases where we might want to use role permissions include:
✓ Archive materials from a project so that they no longer add to project costs
✓ Archive terminated employees so that users can no longer see past employee records
✓ Archive records base on time (e.g. records over 2 years old)
In this article we’ll focus on the first example: Allow users to archive materials related to a project so that they no longer add to project costs
Note: Records that users are not permitted to access will not be included in calculations.
Follow these steps to set up your archiving:
- In the materials table, add a checkbox field and name it “Archive”
- Next, go to your materials table and observe the current total in your ‘List All” report. An overly simplified example might look like this:
- Next, go to the table ‘settings’ and click “Access”. There you will see permission levels for each user role.
- For each role, create a custom rule. Set the rule so that ‘Archive is not equal to true’:
If you’d like a role (ex. Administrator) to be able to view and/or unarchive you can omit the custom rule, or toggle it off when the use needs to unarchive a record.
- Return to the table and check your results:
- Check the “Archive” field you created earlier on one of your table records. In our example we’ll archive our paint item.
- Return to your table and note that the ‘Paint item’ is no longer present:
So why would we remove the item via permissions rather than just using a condition to filter “archive” items from our reports?
First, we’d have to apply the same filter over and over whenever we create a new report. Second, and more importantly, records that a user doesn’t have permission to view are removed globally, meaning that items removed using this method will not be included in reports, lookup fields, formula fields or anywhere else within Quickbase.
In many ways this method is superior to deleting. If you delete a record it is gone forever. With archiving, a mistaken archive can easily be corrected by having a role which has permission to view ‘Archived’ records uncheck the archive field on a record.
Note: This method of archiving will not free up space in your database because the records are still located within the database.
For more of our knowledge base articles regarding how to leverage permissions click here.
- Author: Jake Rattner (firstname.lastname@example.org)
- Date Submitted: 2/28/2019