Hello,
I use this script for move record from table 1 to table 2, All data is moved except data of type dropdown list (Ville). I show this error: Can’t create records: invalid cell value for field ‘Ville’.
Could not find a choice with that ID or name
let table1 = base.getTable("DATA");
let table2 = base.getTable("Con");
let result = await table1.selectRecordsAsync();
for (let record of result.records) {
if (record.getCellValue("Prét")) {
await table2.createRecordsAsync([
{
fields: {
'ID': record.getCellValue("ID"),
'Source': record.getCellValue("Source"),
'Agent': record.getCellValue("Agent"),
'Nom complet': record.getCellValue("Nom complet"),
'Téléphone': record.getCellValue("Téléphone"),
'Ville': record.getCellValue("Ville"),
'Prét': record.getCellValue("Prét")
},
}
]);
await table1.deleteRecordAsync(record.id);
}
}
[details="Summary"]
This text will be hidden