Re: Using javascript to insert multiple select values into a new record

Jump to Solution
4206 0
Showing results for 
Search instead for 
Did you mean: 
5 - Automation Enthusiast
5 - Automation Enthusiast


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


  1. (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.


Array<{id: string} | {name: string}>


I think I need to map this to a new object in the following format which I have done


  1. (2) [Object, Object]
    1. ▶0: Object
      1.  name: "AAA"
    2. ▶1: Object
      1.  name: "BBB"


Any advice would be greatly appreciated.



11 Replies 11
12 - Earth
12 - Earth

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. 




Kamille covers this topic (and limitation) well in the latest BuiltOnAir Podcast;

airtable #on2air #builtonair 1/17/2023 - BuiltOnAir Live Podcast Full Show - S13-E02 ___________________________ The BuiltOnAir podcast is a live weekly show highlighting everything happening in the Airtable universe. Check us out at Join our community, join our Slack channel