Jump to content
Server Maintenance This Week. ×

Inverse Conditional Formatting


This topic is 5257 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a field "XY" which collects values such as "A", "B" or "C". I'm looking for a conditional formatting formula which allows me to cover different parts of the layout in white.

What I have is this:

Transparent Layout Text 1 using Custom Formatting:

XY ≤ "A" and XY ≥ "A" (--> fill color white)

Transparent Layout Text 2 using Custom Formatting:

XY ≤ "B" and XY ≥ "B" (--> fill color white)

Transparent Layout Text 3 using Custom Formatting:

XY ≤ "C" and XY ≥ "C" (--> fill color white)

The problem is that this fills white if A, B or C IS part of field XY. How can I reverse that? I want the layout text to fill white when A, B, or C is NOT part of field XY.

Any ideas?

Link to comment
Share on other sites

Not quite, the idea is that

XY = A

-- > surface 2 and 3 covered

XY = A B

-- > surface 3 covered

XY = A C

-- > surface 2 covered

XY = A B C

-- > nothing covered

XY = ""

-- > everything covered

etc.

A simple equal doesn't work, nor does the "not" option... unless I'm using it wrong.

Link to comment
Share on other sites

IsValidExpression (FilterValues (Your Field ; "Apple Pie" ))

I'd suggest you use:

IsEmpty ( FilterValues ( YourField ; "your value" ) )

The IsValidExpression() function is not appropriate for this use, and your test will fail if "your value" happens to be a valid expression, such as "true", for example.

Link to comment
Share on other sites

You've got a good solution, but just FYI, I had in mind something like:

Position( CondSample::Field 1 ; "A" ; 1; 1 )

That would evaluate to a positive number (i.e. True) if it finds "A" or 0 (False) if it doesn't. Many people use the PatternCount function for this kind of test, but that function has to count every instance of the search string; we're only interested in whether the string exists, and Position will stop counting when we hit the first instance of it, resulting in a totally imperceptible performance gain. :

Link to comment
Share on other sites

Even simpler... never thought of using the IsEmtpy function in this context - brilliant.

Thanks!

Fitch - I'm gonna go with comment's suggestion on this, but your input is very valuable. I know I can make use of it in many other situations.

Link to comment
Share on other sites

This topic is 5257 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.