I'm looking for a simple way to pull all of the values from a particular column based on the rows I've selected in a multiselect table and put them into an array that I can pass to my query.
Welcome to the forum!
In a transformer do the following
return {{yourTableName.selectedRows}}.map(it => {
return { product_id: it.product_id, //where product_id is the underlying name of the column not the Label
}
})
product_id can be the name of the key you need in the query
Thanks so much this has got me really close. How do I make sure i'm only pulling the values, of the key value pair?
If you se see here its repeating the key "product_id" where all I want is the values in an array:
For example the payload should be {"product_ids":["1234567","2345678"]}
Create a transformer and name it yourTransformerNameAsNeeded and populate it with
const product_ids = [];
return product_ids.concat({{yourTableName.selectedRows}}.map(it =>(it.product_id)))
Next create a variable named product_ids and set the Default value to yourTransformerNameAsNeeded.value