currentRow and currentSourceRow in Table Actions

I've read several threads about the availability of currentRow and currentSourceRow in various elements of a table Action. I see that these objects are available for the Set Variable action, but not for the Run Script action. Is that by design? Or, am I missing something? Thanks.


The answer in part anyway is in this post.

  • In the Inspector panel for the Table (New), click on the equalizer icon next to Interaction
  • Find the "On Action Click" dropdown and click on it
  • Do Not Select the Row is the default, which is why SelectedRow is undefined when the user clicks on the Action button (if no row is already selected)
  • Choose either to replace any current row selection with the row over which the Action button was clicked or to add the row to the existing collection of selected rows.
1 Like

Hi @haj,

Thanks for reaching out!

I believe these are exposed in the Run Script action (no need for {{}}):

Let me know if it's not working on your app!

Hi @Tess,

CurrentSourceRow and currentRow are still red underlined and not autocompleted in the "run script" editor
That tooks me a lot of time to do a basic thing with retool.
Is it normal or that's a bug?

Have a nice day!

Hi @Floo Are you seeing this issue for Action buttons or somewhere else in the table? Is it working despite the red underline. I'd like to narrow down whether you're hitting a linting bug, or you're hitting a limitation on where you can reference the value.

On my side, I'm seeing a yellow warning underline and it doesn't auto complete, but it still works when I trigger the click action event:

Hey @Tess,
That's exactly the same than you: no autocompletion and warning underline but is still works when I trigger the action event :+1:

Nevertheless, I loosed a lot of time! And the pleasure to work with the editor is quite degraded when you have to search in the documentation and in several threads of the forum to get a very basic thing working.

In other words, I think that with a autocompletion on currentRow this thread would have never existed, that's why I think that the real resolution of this thread would be to fix autocompletion even if it works for people after a lot of searches.

You may have other priorities! It was just to say that point of view but no problem.


Yes, I definitely hear you on losing time! Just wanted to confirm we're seeing the same issue. I'm not sure where this will land on our roadmap, but I'll share the feedback internally :blush:

1 Like