Hello All,
I’m attempting to wire up a script to a button field. When the button is clicked this is what happens:
- all the fields associated with the clicked button’s recordID are gathered in an object:
let data = {
"field": "value",
"field": "value",
"etc...": "etc..."
}
this data object is then sent to a webhook via fetch post request
What I have is this:
let pipeURL = "webhook URL here";
let table = base.getTable("GPP Website Leads");
let view = table.getView("Grid view");
let queryResult = await view.selectRecordsAsync();
console.log(queryResult.records)
This works, but only returns the recordID and the first field in the view. I’m sure it’s trivial but I can’t figure out how to loop through and get all the fields & associated values for a given recordID. The I could populate my data object with the fields and the values.
Thanks for the help!