Hi Catherine,
If you need to clean your base, (B or A), one time only, i suggest you to do it manually :
- filter on your deadline column to get record older than June 2023
- then select those record and delete it.
If you need an automation to keep your base up to date, you can chose scheduled trigger then execute a script like :
let table = base.getTable('id_of_your_table')
let queryResult = await table.selectRecordsAsync({
fields: ["id_of_your_field_deadline"],
sorts: []
})
for(let record of queryResult.records) {
if(record.getCellValue("id_of_your_field_deadline") >= Date('2023-06-01')){
await table.deleteRecordAsync(record.id)
}
}
BR
Hi Catherine,
If you need to clean your base, (B or A), one time only, i suggest you to do it manually :
- filter on your deadline column to get record older than June 2023
- then select those record and delete it.
If you need an automation to keep your base up to date, you can chose scheduled trigger then execute a script like :
let table = base.getTable('id_of_your_table')
let queryResult = await table.selectRecordsAsync({
fields: ["id_of_your_field_deadline"],
sorts: []
})
for(let record of queryResult.records) {
if(record.getCellValue("id_of_your_field_deadline") >= Date('2023-06-01')){
await table.deleteRecordAsync(record.id)
}
}
BR
Thanks. I ended up doing it manually, as suggested as this was a one-time thing, but good to now how to run a similar script if needed.
Many thanks
Catherine