Airtable automation script to sort linked records by date: Earliest to latest

Topic Labels: Automations
77 0
Showing results for 
Search instead for 
Did you mean: 
7 - App Architect
7 - App Architect

Hi community, I have set up a trigger that loads a record and passes on linked records values to a script supposed to order those by date from earliest to latest. I'm struggling to get this to work, can anyone advise? Thanks!

const inputConfig = input.config()
const linkedRecords = inputConfig.linkedRecords

linkedRecords.sort(function(a,b) {
  var c= new Date(;
  var d= new Date(;

  return c-d;

output.set("linkedRecords", linkedRecords)


0 Replies 0