Oct 01, 2020 09:51 AM
I have an automation that runs a script when records are created. The script has two input variables: the record ID of the created record, and an array of IDs taken from an array field in the created record.
When a record is created without an immediate value for the second input variable (the array) the script run fails with “Failed to construct the value for “Script input””.
I suspect this is happening because the script input generator is trying to do array.IDs and the array is null because the field is empty. But the correct behavior (IMO) would be to simple give my script a null value for that input variable, rather than filling my logs with failed script runs.
Anyone else seeing this? If so, how does one report bugs to the airtable team?
Oct 01, 2020 10:04 AM
I’m afraid I can’t help but I’m having a similar issue. I have a created record triggering another record to be created in a different table, but it will only work if there is an attachment in one of the fields. If this is left empty I get ‘step failed’. Fingers crossed for a solution to this :crossed_fingers:t2:
Oct 26, 2020 10:13 AM
I ran into the same issue. As a workaround, I retrieved the array of linked record IDs inside the script rather than using an input variable. More specifically, I followed these steps:
base.getTable
to get the table for the created record.table.selectRecordsAsync
to get a recordQueryResult for all the records in that table.recordQueryResult.getRecord(recordId)
to get the newly created recordrecord.getCellValue
to get the value from the linked record fieldThis certainly isn’t ideal, but it seems to work.