Ras2019 Posted March 4, 2020 Report Share Posted March 4, 2020 Hello, What is best practice for deleting or cancel a record in a table. 1. Keep the record in the table, but make a status field which can filter out the row based on e.g. a cancellation status. 2. Delete the record in the table, but make a separate log table for records deleted. I need to consider the table design for future API integrations, and general best practice. Any recommendations would be appreciated. Sincerely Ras Quote Link to comment Share on other sites More sharing options...
0 cheonsa Posted March 4, 2020 Report Share Posted March 4, 2020 43 minutes ago, Ras2019 said: Hello, What is best practice for deleting or cancel a record in a table. 1. Keep the record in the table, but make a status field which can filter out the row based on e.g. a cancellation status. 2. Delete the record in the table, but make a separate log table for records deleted. I need to consider the table design for future API integrations, and general best practice. Any recommendations would be appreciated. Sincerely Ras Hello @Ras2019, 1. You can add a Yes/No field, checked if Active, unchecked if Inactive. Then, you can use a View to filter the records based on the Status. https://howto.caspio.com/tables-and-views/what-are-views/creating-a-view-to-filter-data/ 2. To create a record and to save it to other table once the record is deleted to the main table, you need to use a Triggered Action. I have a sample of Triggered Action that you can check. Hope this helps. Quote Link to comment Share on other sites More sharing options...
0 Ras2019 Posted March 4, 2020 Author Report Share Posted March 4, 2020 Hi Ginger, Thanks for your response! Both solutions will do the job, but which one of those two would be the best practice from a data management point of view? Sincerely Ras Quote Link to comment Share on other sites More sharing options...
0 cheonsa Posted May 27, 2021 Report Share Posted May 27, 2021 On 3/4/2020 at 10:37 AM, Ras2019 said: Hi Ginger, Thanks for your response! Both solutions will do the job, but which one of those two would be the best practice from a data management point of view? Sincerely Ras Sorry for the very late response. In my perspective, between the two options, I would go for option 1 which is using a View. It's best to have all your records to stay in just one place other than having them in a separate Tables. Maybe in the future, you will need a report wherein you need to display all the records. Quote Link to comment Share on other sites More sharing options...
0 IamNatoyThatLovesYou Posted May 27, 2021 Report Share Posted May 27, 2021 Hi @Ras2019, Just to add more information. If you want to delete your records in your table, you can also create backups for this so that the data that you accidently deleted can be imported back. You can use scheduled task for this and you can set it up to be daily, monthly, yearly, etc. You can check more information here. Regards, Natoy Quote Link to comment Share on other sites More sharing options...
0 Flowers4Algernon Posted April 29, 2023 Report Share Posted April 29, 2023 Hello! Just wanted to share this forum post should you want to track users who deleted a record: Quote Link to comment Share on other sites More sharing options...
0 Queso Posted April 30, 2023 Report Share Posted April 30, 2023 Hi @Ras2019, You may check on this another Caspio forum post for more idea on deleting records from a table: Quote Link to comment Share on other sites More sharing options...
Question
Ras2019
Hello,
What is best practice for deleting or cancel a record in a table.
1. Keep the record in the table, but make a status field which can filter out the row based on e.g. a cancellation status.
2. Delete the record in the table, but make a separate log table for records deleted.
I need to consider the table design for future API integrations, and general best practice.
Any recommendations would be appreciated.
Sincerely
Ras
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.