Perspective - Getting Values From A Table

How do you get values from a table in perspective? Specifically I’d like to get the value of the first column from a selected row? Eventually this would trigger an event to go to another view.

Currently the data format is json, which is populated from a named query.

Hi,

Currently there are three ways to get data from the table component. These are, selection data, rows configured as expandable subviews, and columns configured as view cells. In your case, it sounds like you’d want to get the selection data, which is located at props > selection > data on the table component. The selection data is a JSON representation of the current selection.

Another option might be to configure the cells of your column as view cells via a column config. The value of that cell (along with other view parameters, { column: string; row: number; value: any; columnIndex: number; rowIndex: number; }) will be passed as a parameter to the specified view. You can then use that value as the text of a link, as an example, that will trigger navigation to a different view.

For the latest information on the table component, check out http://forum.inductiveautomation.com/t/feedback-new-perspective-table.

Hope this helps.