You don't use a script to hide, you use a formula.
Unless you attach a different script to the OnObjectModify trigger for each container, which is IMHO overdoing it.
I don't understand why you don't use the container itself as a button.
The containers can all have the same hide: hide when IsEmpty(self).
when visible, they all call the same script, showContainer, to which you pass Get(ActiveFieldName).
You are right: I misspoke when I said script. I am not using the container
as the button, it is the popup with the empty container I want to hide. How
do I hide the button which holds the empty container? This is my question.
I will try what you offer, but I think that the button will still appear
even if the container it reveals has hidden itself.
Button text can be refered as Self in hide calculation, so you can use it.
Simplest case is if you use exact container field name (like "Example01") in popover button text,
IsEmpty ( GetField ( Self ) )
Thanks so much. This, of course, solves my simple problem, as I am quite a simple user at present.
Now I have a further question: If I hide the button in Browse mode, how do I place graphics in the container as I build the table of procedures? I suppose I could wait to hide the button with the formula until after I have input the data (simple solution, I know).
At any rate, thanks for the quick and effective comments.
I'd use another layout for another purpose (entering graphics).
Or you can add condition to hide, depend on Get(AccountName) or $$isDeveloping etc.
Both great suggestions. Thanks for all the help. I may try the conditional approach just to strengthen my chops. Much appreciated.
I've used the global $$IsDeveloping approach--works great. Thanks again.