You need to sign in to do that

Don't have an account?

Michelle Littlefield 8

# Formula with picklist options not working

I'm trying to create a formula for a custom field, where the picklist value of another field set it as a certain number. If the value is high, give the value 10, if Medium give 5, and if Low, 2. My formula is below. I keep getting various errors, this one in particular giving me the following error: "Error: Field Technology_Risk__c may not be used in this type of formula"

I'm new to formulas, do my formatting may be WAY off. Can anyone help?

IF( ISPICKVAL(Technology_Risk__c, "High") , "10" ,

IF( ISPICKVAL(Technology_Risk__c, "Medium") , "5" ,

IF( ISPICKVAL(Technology_Risk__c, "Low") , "2", null)))

I'm new to formulas, do my formatting may be WAY off. Can anyone help?

IF( ISPICKVAL(Technology_Risk__c, "High") , "10" ,

IF( ISPICKVAL(Technology_Risk__c, "Medium") , "5" ,

IF( ISPICKVAL(Technology_Risk__c, "Low") , "2", null)))

Naren9Based on your screenshot, you are trying to create a

Fieldof Number Type with this Formula not theFormula Field.In regular fields, we can't use this kind of formula.

Try below steps to create a new Formula Field.

I have tried with different Picklist field.

## All Answers

Naren9You Can try this way:

Formula Field Should of Type Number and 0 Decimal.

And below is the Formula Exoression:

CASE( Technology_Risk__C,

"High", 10,

"Medium", 5,

"Low", 2,0)

I have tried in my Org and it is working.

Thanks,

Narendar

Michelle Littlefield 8Thanks Narendar! I've tried that, and I'm getting the same error. Is CASE intended for the cases object only? If it helps to provide more context, this is for a field on a custom object called Program Enrollment. Naren9Technology_Risk__C is a Field or Formula Field?.

In the Above expresson, CASE can be used on any Object. it is nothing related to Case Object.

Michelle Littlefield 8Technology_Risk__C is a picklist field on the same object Naren9Ok. I got it. Technology_Risk__C is a picklist field. Other Field you are doing the Calculation is a Field or Formula Field?. If it is a formula Field, what is the Type -Number or Text or .

Please provide the screen shot of the error when you are doing the Syntax Check.

Michelle Littlefield 8The other field I'm trying to populate is a numerical field, 2 places with no decimals. Here is a screen shot for you! I really appreciate your help.

Naren9Based on your screenshot, you are trying to create a

Fieldof Number Type with this Formula not theFormula Field.In regular fields, we can't use this kind of formula.

Try below steps to create a new Formula Field.

I have tried with different Picklist field.

Michelle Littlefield 8That worked!! Thank you so much!!