Hi, I am trying to update several fields in multiple records, but I have an error when I tried to use the input variables from previous automation actions. The fields that I tried to update are “Invoice” and “Invoice Status” which are single select and “Date invoice” is a date.
Here is my script and screenshot:
let inputConfig = input.config(); //
let records = inputConfig.step2Records
let dateI = inputConfig.dateInvoices
let table = base.getTable("Payouts"); //
for (let record of records) {
await table.updateRecordAsync(record, {
"Invoice": {name: inputConfig.invoicesID}, "Date Invoice": dateI, "Invoice Status":{name:"Completed"} //Replace Emailed with the field name of the checkbox field you want to update, if different.
})
}
Thanks for any help!