function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
EtaussigEtaussig 

Help with validation rule and picklist value

I am trying to write a validation rule which forces a currency entry when a stage is selected on an opportunity:

 

When stage = "needs assessment", first year value > 0

 

This is what I have: AND(ISPICKVAL( StageName, "Needs Assessment"), First_Year_Value__c <> 0 )

 

but I get no error message when I test it in an opportunity.

 

Any help would be greatly appreciated.

 

Thanks

Ellen

shillyershillyer

You almost had it, change it to this:

 

 

AND(ISPICKVAL( StageName, "needs assessment"), First_Year_Value__c > 0 )

 

Basically, I just changed the <> to >. Also, you should put this validation rule on the currency field.

 

Hope that helps,

Sati

 

EtaussigEtaussig
Thanks - I tried it, but still no error message.  What do you mean by putting it on the currency field?
shillyershillyer

You can create a validation rule on the object and on the field. Be sure to place this on the field itself. Go to Setup and click on the Field Label, you'll see a section to add Validation Rules for that specific field.

 

Best,

Sati

EtaussigEtaussig
Thanks so much for your time.  I added the rule to the first year value field, and still no error message.  I must be doing something wrong.
shillyershillyer

I thought you were trying to force a value in a currency field. The validation rule should be on the currency field.

EtaussigEtaussig
Thanks - i figured it out.  I needed to be ISNULL.