Does anyone know how to include a script that includes moving records with formulas and drop-down options to another record from this, I’m stuck and it keeps giving me this error message:
ERROR
P: Can’t create records: invalid cell value for field ‘Answer Option Type’.
Could not find a choice with that ID or name
at main on line 6
This is the script:
let table1 = base.getTable(“Table1”);
let table2 = base.getTable(“Table2”);
let result = await table1.selectRecordsAsync();
for (let record of result.records) {
if (record.getCellValue("Move to Table2")) {
await table2.createRecordsAsync([
{
fields: {
'Question Text': record.getCellValue("Question Text"),
'Sector': record.getCellValue("Sector"),
'Logic - Parent Question' : record.getCellValue("Logic - Parent Question"),
'Answer Option Type': record.getCellValue("Answer Option Type"),
},
}
]);
await table1.deleteRecordAsync(record.id);
}
}