May 12, 2022 10:55 AM
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.
Solved! Go to Solution.
May 12, 2022 06:51 PM
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.
May 12, 2022 06:51 PM
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.
May 13, 2022 10:04 AM
Thank you Justin! this helps a lot!!