How to hide/unhide fields (visible event) based on window.variable

Discussion created by JelleD on Oct 7, 2019
Latest reply on Oct 14, 2019 by JelleD

Hi Community,


anyone any Idea how to hide/unhide (visible property) fields based on a window variable instead of a form-field value.

For an approval form and workflow I have to show(unhide) the required approver fields based on the output of a query. I prefer to run the query once instead of running it for every approver field ;-)
I have an formload action which sets the window variables at start(initial) to false (0) but when form-input changes a query (to an Authorisation Matrix) is triggered which check which approver-fields have to be enabled.

I set the variables to true (1), but the visible event is not triggered.  If I create an additional field in my main list something like useDirectorApprover [Yes/No] and sets this to Yes or No based on query output the visible event is triggerd, but this is not really what I want. I prefer to have as less columns in my main list as possible.


this is how my visible event, type Function Code,  looks-like:

return (window.CatDirector==1?true:false);          



I can imagine that visible event is only listening/triggering to form-events (form field changes), but is there something I can do without adding a lot of "helper"-columns to achieve the desired behaviour?

Just wondering if there are other options....?