Unable to reference current row in table

  • Goal: I want to reference each row in a table in a certain column. For example, I want a button to be disabled if one of the values in the row exists.

  • Steps: Using currentSourceRow and sourceRow keeps referencing the first row in the table for all of the rows, instead of its own row. selectedRow won't work in this case because the value should be set on table load, not only when the row is selected.

  • Details: Using the table component and setting a column value to a button. I'm attempting to reference a few different values from the current row for both enabling/disabling the button and constructing the URL I want it to direct to.

HI @mraman and welcome fo the forum!

Would you mind sending a screenshot of your setup? both currentSourceRow and currentRow refer to exactly that, so it is weird that you keep getting the first row in the table.

For example, in a table with two rows, when I write the variable currentSourceRow.session_id I can see all the values within my table, and each row will refer to the value in its own row.


Sure. You can see here that I'm checking the currentSourceRow for the second row, where the state is NY. But when I hover over currentSourceRow, the data is for the first row where state is CA.

Also, when looking at the ID under column Cerbo Link, you can see that the selected row's id (pulling from {{ item }}) is 4314, but the currentSourceRow.id is showing 4224, which is the first row's id.

Hi @mraman,

Thanks for providing more context. So, when you hover over {{currentSourceRow}} and {{currentRow}}, the preview will always show you the data for the first row on your table, regardless of which row is selected. In fact, a variable's preview that would change based on the row selection would be {{table1.selectedRow}} and {{table1.selectedSourceRow}}

You can do a test by writing {{currentSourceRow.cerbo_encounter_id === 4224 (or maybe between quotes as it seems a string). And you will see only your first row button will be disabled.