When I run my following code within the Scripting App, it returns an overly useful object that I can easily sort and use to update my record with.
let sortedResults = membersRecords.records
.filter( member => member.getCellValue("Result Date") !== null)
.forEach( member => (
Note how valuesByLinkedRecordId, which is a lookup field set to return the date, returns the below object - and how in this object the records are incorrectly ordered by date.
This returned valuesByLinkedRecordId object is fantastic, as it can be processed into an object that's sorted by date and then stamped back into the associated Linked Field so that the records are then in the date sorted order.
However, when I attempt to adapt my Script App code (which cycles through all records in the table) into an Automation script that's nested within a "Repeat for each" loop, I find that valuesByLinkedRecordId returns undefined. It's like it doesn't exist within the Automation environment?