Skip to main content
Question

Deleting a record from one table based on a condition from another

  • July 31, 2025
  • 5 replies
  • 79 views

Forum|alt.badge.img+2

I am trying to share information between two tables, a short list of info and a long list of info. There is a checkbox column in the long list that when checked, it adds that record to the short list. But if the record is unchecked, I want to delete that record from the short list, so it is not there anymore. I haven’t found an easy way to do this, so I wanted to throw it out here.

5 replies

felipe-saucedo
Forum|alt.badge.img+10
  • Inspiring
  • 35 replies
  • July 31, 2025

If It is only a check mark you can use a filter. But if you need to delete a record you would need to use a script or make.com


Forum|alt.badge.img+2
  • Author
  • New Participant
  • 1 reply
  • July 31, 2025

Would the script look something like this?

 

let inputConfig = input.config();

let recordId = inputConfig['recordId'];

await shortTable.deleteRecordAsync(recordId);


MatteoCrOps
Forum|alt.badge.img+3
  • Participating Frequently
  • 12 replies
  • August 1, 2025

@egarof in my experience any AI tool (including Airtable’s AI script helper) will help you with simple code like that – just make sure your logic is sound and experiment!


TheTimeSavingCo
Forum|alt.badge.img+31

Yeah that script looks mostly right, you’re missing a declaration of ‘shortTable’ though

---

You’ll also need to set up ‘recordId’ as an input variable, see the ‘Input’s section from the docs:

https://support.airtable.com/docs/run-a-script-action#setting-up-a-run-a-script-automation-action

This also depends on how your tables are structured.  Assuming that ‘recordId’ is taken from a linked field to shortTable, then you’ll need to use ‘deleteRecordsAsync’ instead, and so here’s a script you can try:

let shortTable = base.getTable(‘TABLE NAME HERE’)
let {recordId} = input.config();
await shortTable.deleteRecordsAsync(recordId);
 

ScottWorld
Forum|alt.badge.img+35
  • Genius
  • 9808 replies
  • August 1, 2025

@egarof 

Are you sure that you need to split your record info across 2 different tables?

If you only need to see certain information about a record (short info vs. long info), you can use 2 different views or 2 different interface pages for that.

- ScottWorld, Expert Airtable Consultant