List of IDs CreateRecordsASync

Topic Labels: Scripting extentions
2404 13
Showing results for 
Search instead for 
Did you mean: 
8 - Airtable Astronomer
8 - Airtable Astronomer

Hi there - How is it possible to add a list of IDs into a createrecordasync function?

For instance, we have:

id_array: [recK0FKsUDicD8Lar,recP4uFoqMq9qJquY,recudo4XILtrW5IYd]

const table_Output = base.getTable(“Output_Results”)
{fields: {
Client: [{id: clientID}],
Symptom: [{id: {id_array}]}

where we replace id_array with the actual array


13 Replies 13

I would use mentioned function ‘map’, which loops through array of IDs and returns array of objects like {id: recordID}

const => ({id: recordID}))
const toCreate={fields: {Client: [{id: clientID}], Symptom: symptom} }

8 - Airtable Astronomer
8 - Airtable Astronomer

Thanks @kuovonne and everyone. It is working:

Glad you got it working. Do you mind sharing what specifically solved your issue? (It can be hard to identify the key concept in an entire base share.) This could help anyone else with a similar issue who later reads this thread.


Here is the code I used. It worked when I did what you asked. I originally thought you meant to do the mapping in the loop, so it wasn’t working but it worked when I put it in the createrecords command:

var t_links = base.getTable("Table 1")

var t_links_aw = await t_links.selectRecordsAsync

var t_table = base.getTable("Test linking")

var t_table_aw = await t_table.selectRecordsAsync

var arr_id = []





    Name: "This is a name",

    linked: => ({id: recordID}))