I am looking for suggestions to change my script so that it does not time out. My script is below. Basically when a new record enters a view on a Table A (‘Verifier Bodies’), I want to update another Table B (‘Technical Comments for VB’) by linking all the records in that view in Table A to records in the view on Table B. The script below ‘works’, but is now timing out due to the number of records. I think I need to make a change so that just the new record is added to the field ‘Verifier Body List’ in Table B without overwriting the already linked records. How would I go about that? Any help is appreciated.
let TBTable = base.getTable(“Technical Comments for VB”);
let TBView = TBTable.getView(‘General Share for VB’)
let TBQuery = await TBView.selectRecordsAsync();
let TBRecord = TBQuery.records;
let VBTable = base.getTable(“Verifier Bodies”);
let VBView = VBTable.getView(‘List of SLCP for Higg Co.’)
let VBQuery = await VBView.selectRecordsAsync();
let VBRecords = VBQuery.records;
let d =
[]VBRecords.forEach(c => d.push({id: c.id}));
TBRecord.forEach(x => {TBTable.updateRecordAsync(x.id, {‘Verifier Body List’: d})})

