HTML buttons inside of retool table trigger query


I'm attempting to add 2 separate HTML buttons inside of a custom column. I'm doing this by creating a custom column > Column type > HTML and having code that looks like:

<button onclick="tableActions.trigger()">Click me</button>
<button onclick=tableActions.trigger()">Click me</button>

I'm attempting to trigger a javascript function I created in my retool app called tableActions. When clicking on these buttons inside of the tables nothing occurs. Am I able to trigger a retool query from inside of an HTML column type?


Hey @ovryu,

I'm not 100% sure but I don't think that'll work. I've tried also via global functions but it seems that you can't actually trigger a query like this.

Have you tried using "actions" instead of a HTML column? That definitely works:p

There is an advanced technique for doing this which is working for me (though with <a> links rather than buttons but it should not matter.)

Oh dang, that's a nice workaround :rocket: