How to conditionally show a button?

I am using a button component to execute some Js script. It is working fine for executing the scripts, but I would like to conditionally render the button. Is this doable with retool?

For example, I have the following data in Postgres:

  "name": "foo",
  "activated": false

I only want to show a button called Activate, when activated === false. Is there a place for me to set such condition?

There is an input called "Hidden" on the button component.

{{yourdata == "foo"}} or {{yourdata !== "foo"}} inside that componant will get you the result you are looking for.


1 Like