Pulling column value from a Perspective table

Hi sorry for the noob question. If I have a perspective table component, with a query binding on it. and I wanted to get the value of one of the columns returned from the query.

Can you get that information from one of the Properties ? I guess it has something to do with the data property below selection and then you have to add objects or arrays or something. sorry bit clueless and brain not working today. I know you get it obviously by scripting

If it's a dataset, you can use ds.getColumnAsList(x) where ds is your dataset and x is the column index (starting from 0).

So you can create a custom property, bind it to your table's .data prop, add a script transform and return value.getColumnAsList(i).

If it's not a dataset, but an object (you chose json as the return format in your query binding), you can use this instead:

return [row['column_name'] for row in value]
1 Like

thank you pascal