Hidewhen Formula Made Easy

I'm sure many of you has had nightmarish Hide-When formulas written
to get a button or whatever element to hide when you don't want it and to appear
when you do.

Sometimes the solution is to turn your thinking inside-out.

If you have a situation where an element needs to be hidden for only one or two
scenarios
writing the formula can be easy. But what if you DON'T want it hidden for but a
few situations and
need it hidden for a multitude of others. Trying to write the formula with all
kinds of NOT , AND's, ORs, etc.
can be frustrating - there always seems to be an instance where the element will
or will not hide when desired or doesn't show up at all.

Try reversing your thinking and write your formulas AS IF it was SHOW WHEN. You
probably can come up with a relatively simple formula
such as:

@IsNewDoc | (Status="Approved" and Location!="Local")

Now, simply NOT the entire expression:
!(@IsNewDoc | (Status="Approved" and Location!="Local"))

and Presto - the expression is in effect a Show-When since it now hides for all
instances where you don't want to see it!!

This was first published in November 2000

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.