Jan 26, 2024 09:34 AM - edited Jan 26, 2024 09:36 AM
Hi everyone, just wanted to leave my newest video here about the one script that I'm using in all of my Airtable bases: A script to clean up records!
Let me know what you think and if it brought value to you 🙂 I'm posting multiple times per week, so subscribe if relevant for you.
Jan 27, 2024 05:16 PM - edited Jan 27, 2024 05:31 PM
Hi,
'oneliner' can be used. 😀
for (let tab of base.tables) await tab.selectRecordsAsync({fields:[]}).then(q=>q.records.filter(r=>r.name=='Unnamed record')).then(f=>{while(f.length) tab.deleteRecordsAsync(f.splice(0,50))})
Of course, I wouldn't use such script, because some of my tables contain necessary data in 'unnamed' records. So, at least exclusion list must be applied.
In general, I think, such videos are useful to learn scripting basics.
Jan 27, 2024 10:40 PM
💪👌love one liners! I think for learning though (aim of my content), this usually looks too cryptic for people / would've at least been too much for me when I started out