I can't get the index of a row in multiselect row table clicking on the row button

Hello!

I am trying to retrieve the index of row in a multiple select row table by clicking the button inside the row.

I read this post: Multi-select table, run a query on button click for specific row - #6 by lauren.gus
Where indicates that you can use the "triggeredById" and the "i" to obtain the component and the component's index in that table.

The "triggeredById" works but the "i" always returns "0" regardless of the row where I click.

This is the table I'm using:

The "view" button executes the query "query4"

And I always get the following result:
image

Why does "i" always have the value "0"?

Hi @Eduardo_Gomez, welcome to the community :hugs:

i wouldn't work here like in a list view.

You can use an Action on the table and access the current row via currentSourceRow. You can send that to your JS query via additionalScope or run directly in the handler.

Screenshot 2024-01-03 at 7.49.00 PM

Hope that helps,
mj

1 Like

Thank you so much @minijohn !

It works perfectly!

1 Like