Oct 29, 2024 08:34 AM
Any way to clear all records or delete a table through script?
This don't work:
Solved! Go to Solution.
Oct 29, 2024 09:49 AM
Hey @renewNiko!
I just sent you my own version of the script via PM, in case @kuovonne did not send that over yet :D.
Best,
Mike, Consultant @ Automatic Nation
Oct 29, 2024 08:47 AM
Yes, it is possible to delete all records in a table through a script. The script is actually a very simple one; however, because it is so destructive, I don't feel comfortable posting a version.
It is not possible to delete the table itself via scripting.
Where did you get the code you posted? It looks like code for removing items from an array one at a time, which is very different from deleting an actual table.
Would you care to share why you want to delete all the records in a table or delete the table itself via code? Usually these things are done very infrequently and thus can be done via human interaction.
Oct 29, 2024 09:05 AM
Thank you for the reply. There is a third-party integrations that feeds data and they can't keep track of changes/new rows in the data so they send everything. Therefore, I would like to empty the table every day.
I would be grateful if you posted that simple script. PM me if you like, the risk is on me 🙂
ps
the script I posted was something I just came up with just using IntelliSense...
Oct 29, 2024 09:49 AM
Hey @renewNiko!
I just sent you my own version of the script via PM, in case @kuovonne did not send that over yet :D.
Best,
Mike, Consultant @ Automatic Nation
Oct 29, 2024 09:57 AM
@renewNiko wrote:the script I posted was something I just came up with just using IntelliSense...
Thank you for saying how you got the code. Looks like IntelliSense doesn't know anything about the Airtable scripting environment. I would not trust it to come up with an Airtable script.
Oct 29, 2024 02:37 PM
Thanks Mike! 👍
Nov 13, 2024 10:18 AM
Hello Mike, can you send me the script too? 🙂