So I have a table which is filled by a PostgreSQL query.
Suppose I add a selection with which I want to optionally filter the table server side.
I can’t use a different query by just appending an " and field = ‘{{ mySelection }}’") because the table is tied to the original query and the additional constraint should only apply if something in the selection is actually selected.
Next I thought about doing something like
storeValue("filter", " and field = '{{ mySelection }}')
in the selection’s onChange and putting {{appsmith.store.filter}} into the original query, doesn’t work either, because on load, {{appsmith.store.filter}} is null. Is there an onLoad event I could hook into to set appsmith.store.filter to “” ?
Any other alternatives?