Hello,
I am setting up a record to duplicate a record (but only certain fields) in a base by taking input variables and then creating a new record and inputting these into the new record as such
let recordIdNew = await table.createRecordAsync({
"DateTest": StartDate,
"SingleLineText": SingleLineText,
"PhoneNumberTest": PhoneNumberTest,
"CheckBoxTest": CheckBoxTest,
"LongTextTest": LongTextTest,
"EmailTest": EmailTest,
"SingleSelectTest": {name: SingleSelectTest},
});
I have managed to achieve this with all the required data formats but I’m really struggling with Multiple Select. I am able to pull the data from the original records field and it shows in the console as follows
CONSOLE.LOG
(2) &"AA", "BB"]
The issue is, I don’t know how to add it to the new record (like I am able to do with all of the other data types)
I have had a look at the write data format but it doesn’t really make any sense to me at this early stage of my AirTable career.
TYPEDEF
Array<{id: string} | {name: string}>
I think I need to map this to a new object in the following format which I have done
CONSOLE.LOG
(2) >Object, Object]
0: Object
- name: "AAA"
1: Object
- name: "BBB"
Any advice would be greatly appreciated.