Using a field of a query in selectedRow but the field is hidden in the table

Hey all! I'm going to try to explain the use case I have as I'm not 100% how to go about it.

I have a table that is the result of a query but I hid some of the columns since I don't want them displayed on the table. When a row on the table is clicked, I have a modal open up, and in this modal I need to access some of the columns I hid in the original table for the currently selectedRow.

Is there any way to go about this? I realize selectedRow is only containing whatever is displayed on the table. Thanks in advance!

Hello!

I think you can use yourTable.selectedSourceRow to get all of the data regardless of the column's visibility.

You could also just use the table's source query and get the hidden column's value by index with yourQuery.data[selectedDataIndex].theHiddenColumnProperty

I just did a quick test with an example table and a hidden column and I was able to see the column and its data with selectedRow so I'm also curious about how you are setting up the table. Is this a dynamic or calculated custom column?

1 Like

@pyrrho - Almost. If you're doing it on multiple rows, then yes, the selectedSourceRow is correct. If he's just selecting one row to source teh data for a pop up, then he needs to use selectedRow.

You can access the specific column of your table's clicked selectedRow by just adding the ".columnName" to the end. Basically when you click on a new row in your table, it will set

For example, in a textbox, you can do the following to present the data from the selected row.
ID: {{table1.selectedRow.id}}
Hidden Name: {{table1.selectedRow.hiddenName}}
Shown Column: {{table1.selectedRow.shownColumn}}

I hope this helps!

1 Like

Using selectedSourceRow did the trick and is exactly what I was looking for! Thank you!!

2 Likes