Jump to content
  • 0
Sign in to follow this  
Ras2019

Best practice for deleting Table Records

Question

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

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
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.

image.png.508ecf770ac5edbcdfceee34315cd9f0.png

 

Hope this helps. 

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...