cancel
Showing results for 
Search instead for 
Did you mean: 

Formula to Highlighting a field based on part description

Former Member
0 Kudos

I have an existing report and I want to use a formula to highlight the product description in a different color by checking the the 1st char of the product code for the control break.

Is this possible and if so can someone show me the code ?

Many thanks

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi John,

Right click the field > Format field > Font tab > click the formula button beside Color and use this code:

If {product code}[1] = 'x' then

CrBlue

Else CRNoColor

Replace product code with its field name and 'x' with the value you're evaluating it for.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

That worked perfect . Thanks

Is there also a way to evaluate several different codes  ?

eg,  Material code beginning with 9 = Red

Material code beginning with 6 = Blue

Everything else = Yellow

Thanks again

John

abhilash_kumar
Active Contributor
0 Kudos

Yes:

select {Product Code}[1]

case '9' : crRed

case '6' : crBlue

Default: crYellow

-Abhilash

Former Member
0 Kudos

Abhilash,

That worked a treat - Thank you so much.

John

Answers (0)