Jan 17, 2023 06:10 AM
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
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
Any advice would be greatly appreciated.
Solved! Go to Solution.
Jan 23, 2023 10:46 PM - edited Jan 23, 2023 10:47 PM
I had such case in Automation too. Instead of creating record by script, I finished code with some 'output.set's, using these values in a next 'Create record' step.
Jan 23, 2023 11:32 PM
Kamille covers this topic (and limitation) well in the latest BuiltOnAir Podcast;
https://www.youtube.com/watch?v=81GDyLVFAy8