Question : Selection Formatting Question

Hey all....another question

I am using selection formatting to evaluate a field value and then apply color based upon the field value.  My formual is listed below....

Select CurrentFieldValue
    case is >= 1    :crRed
    case is > .75       :Color (244,134,11)
    case 0              :crNoColor
    case is <= .50      :crLime
    case is <= .75      :crYellow
    default  

I have a new value 'NB' which is text....How can I incorporate this into my code above...

I have tried

Select CurrentFieldValue
    case = 'NB'      :crRed
    case is >= 1    :crRed
    case is > .75       :Color (244,134,11)
    case 0              :crNoColor
    case is <= .50      :crLime
    case is <= .75      :crYellow
    default


That didnt work...I am pretty sure its because its text and not a number....Any push in the right direction would be helpful.

Thanks,
bob  

Answer : Selection Formatting Question

Bob:
The data may look like it is either numeric or text but the formula can only return one data type.  Because you put quotes around the 0 and used the cstr function, you have converted the numeric data to text.

Are you sure you have this in the font color for the formula and not in the font color for another field?
If you use the formula name instead of CurrentFieldValue do you get the same error:

if {@formula_name} = "NB" then
    crRed
else
Select val({@formula_name})
    case is >= 1    :crRed
    case is > .75       :Color (244,134,11)
    case 0              :crNoColor
    case is <= .75      :crYellow
    case is <= .50      :crLime
    default                 :crNoColor
Random Solutions  
 
programming4us programming4us