Help

table.selectRecordsAsync() only ever returns first column

Solved
Jump to Solution
2438 2
cancel
Showing results for 
Search instead for 
Did you mean: 
VivaLaPanda
4 - Data Explorer
4 - Data Explorer

I have the following code:

let table = base.getTable("Volunteers")
let view = table.getView("Grid view")
let currentTableDat = await view.selectRecordsAsync({

    fields:["Submitter Slack Email"]

});
console.log(currentTableDat)

No matter how I pass in the fields parameter, the output in the log block is always just the first column ( a timestamp). I’ve tried not passing in any option, passing in the field ID, etc. The query totally ignores any of the parameters. The table is full of data, and table.fields shows the other columns. Any help?

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

You need to get the cell values using the getCellValue() method.

let records = currentTabledat;
let email = records[0].getCellValue("Submitter Slack Email");

See Solution in Thread

2 Replies 2
kuovonne
18 - Pluto
18 - Pluto

You need to get the cell values using the getCellValue() method.

let records = currentTabledat;
let email = records[0].getCellValue("Submitter Slack Email");
VivaLaPanda
4 - Data Explorer
4 - Data Explorer

Thanks! that pretty much solved it.