- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 21, 2023 11:08 PM
Hi, I am trying to get selectRecordsAsync() to work. I looked up some older posts here and know that the old version was depricated I have to add an array of the field values, however it's still not working.
Here is my code:
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 22, 2023 12:21 AM
As your function is async you need to await the call to it.
async function updateCompanyDomains() {
let table = base.getTable("MyTableName");
let queryResult = await table.selectRecordsAsync({fields: table.fields});
console.log(queryResult)
}
await updateCompanyDomains()

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 22, 2023 12:21 AM
As your function is async you need to await the call to it.
async function updateCompanyDomains() {
let table = base.getTable("MyTableName");
let queryResult = await table.selectRecordsAsync({fields: table.fields});
console.log(queryResult)
}
await updateCompanyDomains()
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 22, 2023 12:54 AM
Thanks so much, Jack_Manuel, that did the trick. Guess a Java Script basic - must refresh my JS brain cells.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 22, 2023 01:06 AM
It happens to the best of us!
