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
Steve Gilbert 13Steve Gilbert 13 

validation rule using picklist

Can't belive this one is bugging me so much but I am trying to comeup with a validation rule that is using a picklist field, field A, of 0-10 and a currency field, field B.  Last try was:

If(
   NOT(ISBLANK(TEXT(  FIELD A  )),
         (FIELD B <> 0),null)

All I am trying to do is say if the picklist field has a value than the currency field cannot be blank.. Above it my 5th attempt and all of them allow me to save the opp without a value in B.

Any ideas would be great.
Thanks
 
Best Answer chosen by Steve Gilbert 13
SubratSubrat (Salesforce Developers) 
Hello Steve ,

Can you try with below rule :
 
AND(
NOT(ISBLANK(TEXT(Field A))),
ISBLANK(Field B)
)

Hope this helps !
Thank you.
 

All Answers

SubratSubrat (Salesforce Developers) 
Hello Steve ,

Can you try with below rule :
 
AND(
NOT(ISBLANK(TEXT(Field A))),
ISBLANK(Field B)
)

Hope this helps !
Thank you.
 
This was selected as the best answer
Steve Gilbert 13Steve Gilbert 13
that did the trick thanks