I’m using an action button to change some data in a table. There are 4 fields. I want 3 of them to be optionally updated. If no entry in on of the prompts, I want the value left unchanged.
I’ve set the 3 fields as optional.
Then I use this as my update statement:
UPDATE schedule.schedule_jobs
SET email= (case when coalesce({{email}},'') <> '' then {{email}} else email end),
email_subject =(case when coalesce({{subject}},'') <> '' then {{subject}} else email_subject end),
email_body = (case when coalesce({{body}},'') <> '' then {{body}} else email_body end) ,
include_dashboard_link = {{include_link}}
WHERE id = {{id}}
This is the UI with the error:
Is it possible to do this?
Frustratingly, it keeps removing the optional bits making testing harder.
