Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional formating based on row value

Status
Not open for further replies.

ppetronas40

Programmer
Nov 10, 2008
3
US
Hi,

I want to change the font color of the field based on a value but if I do add a condition in formula editor it doesn't check the condition and changes the color for all the values.

if {command.type}="Total Successes" and {command.type}="Total Errors" then crred
else crnavy

I just want to show Total Errors and the Total Successes in red font and the rest in navy.

Thanks,
Petronas
 
Hi,
The formula's AND clause can never be met for one field ( and the formula MUST be entered in that Field's Format options ) so, click the x*2 next to font color and enter this ( use OR not AND):

if {command.type}="Total Successes" OR {command.type}="Total Errors" then crred
else crnavy



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
HI Turkbear,

Thanks for your help. I put in the following formula in the format field next to the font color

if (({Command.error_Type}="first error ") or ({Command.error_Type}="second error")
or ({Command.error_Type}="other error" )or ( {Command.error_Type}="third error"))
then crnavy
else if (({Command.error_Type}="total errors") or ({Command.error_Type}="total successes"))
then
crteal

and it is not working as it should. The first set of result data block from first error to total successes are displayed on Navy and then from second block they are displyed in Teal..

Appreciate your time and help,
Petronas
 
Try this;

if {Command.error_Type} in ["first error ", "second error", "other error", "third error"] then crnavy
else
if {Command.error_Type} in ["total errors", "total successes"] then crteal
else
crnocolor

Works in my database. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top