+ Start a Discussion
ManuelForceManuelForce 

PROBABILITIES - validation rule to allow only a few values.

Fellow members of the force !

 

I'm in dire need of a validation rule that does the following:

only allow values of 0,10,20,40,60,80,100 % in the probabilities field

and release the hounds of hell (error message) if someone enters

something else.

 

I tried ...

 

OR(

probability=0, probability=10 .. etc...)

 

then I tried 

 

NOT(

OR( ... same thing ... )

 

Any help much appreciated !!!!

 

Thanks in adavnce !!!

Best Answer chosen by Admin (Salesforce Developers) 
ManuelForceManuelForce

Thanks Stevemo !

 

Actually, what did the trick was:

NOT(

OR(

Probability = 0,

Probability = 0.10,

...

...

)

)

 

May the FORCE be with you ! ...

 

Cheerio

All Answers

ujackbujackb
Are these probabilities in Opportunities , if so why dont you just make the field read only , its linked to stage and therefore will change with the stage
ManuelForceManuelForce

OK, I need to get clearer on the "why". We want sales reps to have the chance to override the probability (e.g. for one specific stage, they can choose 40% or 60%) but only have a limited choice of sales stages to choose from ...

 

Thanks !

SteveMo__cSteveMo__c

If you just want to enforce a 10% increment rule you can use this:

 

AND (Probability <> 0,Probability <> 0.10,Probability <> 0.20,Probability <> 0.30,Probability <> 0.40,Probability <> 0.50,Probability <> 0.60,Probability <> 0.70,Probability <> 0.80,Probability <> 0.90,Probability <> 1.00)

 if you want to exempt an Opportunity Stage or two, then just amend it with an 

 

 

AND(ISPICKVAL(StageName, "Blah Blah, Blah..."

 or something like that...

 

 

 

 

ManuelForceManuelForce

Thanks Stevemo !

 

Actually, what did the trick was:

NOT(

OR(

Probability = 0,

Probability = 0.10,

...

...

)

)

 

May the FORCE be with you ! ...

 

Cheerio

This was selected as the best answer