I am trying to duplicate a row from one table to another (using scripts). The table I am copying from has a column with “rating” type field in it.
How do I go about duplicating in the createRecordAsync script?
I tried something like
let table1 = base.getTable("Table1"); let table2 = base.getTable("Table2"); let table1Rec = await table1.selectRecordsAsync(); await table2.createRecordAsync({ "Memo":[{icon: "star",max:table1Rec.getCellValue("Memo"),color:"yellow"}] }
I got an error. Summarizing it:
“(property) “Memo”?: 0 | 1 | 2 | 3 | 4 | 5
Type ‘{ icon: string; max: number; color: string; }’ is not assignable to type ‘0 | 1 | 2 | 3 | 4 | 5’.
Type ‘{ icon: string; max: number; color: string; }’ is not assignable to type ‘5’.(2322)”