Help

I tried running a Vlookup script but won't work, selectRecordAsync crossed out, can I get help please?

Topic Labels: Extensions
Solved
Jump to Solution
681 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Mara_Mora
4 - Data Explorer
4 - Data Explorer

Hi, I have no coding experience, Im trying to run a Vlookup to search a value from a single select field (integrated from jotform) and bring a value from another table related to that value. Saw a script on youtube but won’t work, the only difference with the video is that the selectRecordsAsync is crossed out.

image

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

Welcome to the community, @Mara_Mora! :grinning_face_with_big_eyes: The strikethrough on the selectRecordsAsync method name is because it’s not configured properly. Hover your mouse over it and you’ll see a popup with more info (you might need to scroll in the popup if you can’t see it all).

Long story short, proper use of that method includes passing an object containing an array of fields that you want to retrieve from the table records. Here’s a brief example:

let table = base.getTable("Table Name")
let query = await table.selectRecordsAsync({
    fields: ["Field One", "Field Two", "Field Three"]
})

This specific list of fields allows Airtable to operate more efficiently by only collecting the data that the script needs.

See Solution in Thread

2 Replies 2
Justin_Barrett
18 - Pluto
18 - Pluto

Welcome to the community, @Mara_Mora! :grinning_face_with_big_eyes: The strikethrough on the selectRecordsAsync method name is because it’s not configured properly. Hover your mouse over it and you’ll see a popup with more info (you might need to scroll in the popup if you can’t see it all).

Long story short, proper use of that method includes passing an object containing an array of fields that you want to retrieve from the table records. Here’s a brief example:

let table = base.getTable("Table Name")
let query = await table.selectRecordsAsync({
    fields: ["Field One", "Field Two", "Field Three"]
})

This specific list of fields allows Airtable to operate more efficiently by only collecting the data that the script needs.

Thank you Justin! this helps a lot!!