Insert data depending on a value inside my query

Hey! I've been trying to find a way to update a values depending on a column value. But I am not familiar with writing it in query form so i am using the GUI feature. Can we add a condition there depending on a value inside the table that i created (the table is based on postgresql data and retool db)
Example: I want when column contacted supplier and customer to be false to update bookingstatus if it is false bookingstatus_hb (these 2 are the columns that I added in the query come from a case function)

Thank you in advance!

Hi @Wissam,

I think you could do this with JS (which you can use inside the {{ }} almost anywhere. I'm not entirely sure of your fields, but you could set the value to something like:

{{ contacted.input.value === false ? "value if it's false" : "value if it's true" }}

Hey Mike! I'm not that strong in Java, If you check my screenshot, I'm doing it using the table of left side to update the values using input fields but I do not have the chance to change it depending on the values of the query