table.selectRecordsAsync() only ever returns first column

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 Like

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

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

Thanks! that pretty much solved it.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.