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
kfrankfran 

Need Help with ISPICKVAL Validation Formula

Hello,
 
I need help creating a Validation rule between two picklist fields.  Something which says:  If "X" is selected in custom picklist field 1,  then Custom picklist field 2 cannot be blank. 
 
Any help would be much appreciated.
 
Thanks!
HarmpieHarmpie
Isn't it better to implement this 'check' using the dependant picklist feature?
kfrankfran
Yes, I guess I was making it more complicated than it needed to be.
 
Thank you!
FariximusFariximus
Hello,
 
I am trying to create my first validation rule as below and I am getting all kinds of errors. I thought this would be just like Excel. Any suggestions anyone can offer will be greately appreciated.
 
If(
  AND(ISPICKVAL( Price_Stage__c , "Quote Needed") , 
BEGINS( Product_Group_short_oppty__c, "I"),
ISPICKVAL( Pricing_Strategy__c, "Don't Know"),"",))
HarmpieHarmpie
What errors do you get? The last comma in your formula seems out of place anyway, also your AND() statement doesn't seem to be set up correctly.
FariximusFariximus

Thanks for your response. I sometimes get an error stating that I have too many parenthesis, other times I get an error that I don't have enough. How is my AND function wrong? Did I correct it below?

if(
      and(ISPICKVAL( Price_Stage__c , "Quote Needed") , 
BEGINS( Product_Group_short_oppty__c, "I")),
ISPICKVAL( Pricing_Strategy__c, "Don't know"), Null, ))

KC CRM AnalystKC CRM Analyst
OK, quick lesson about Validation Rules.

You never need to use IF().  The IF() is understood in the evaluation of the formula and evaluates only for the True result rather than a specific return.

Your validation rule should look like this (pardon my layout but, it does assist with support reading the rule if it is having troubles):

AND(
ISPICKVAL(Price_Stage__c,"Quote Needed") , 
BEGINS( Product_Group_short_oppty__c, "I"),
ISPICKVAL(Pricing_Strategy__c,"Don't know")
)

This is read as:

If
Price Stage is "Qoute Needed"
and
Product Group short oppty begins with "I"
and
Pricing Strategy is "Don't Know"
trigger the rule, else do nothing (notice that the do nothing is not used because this only evaluates for true)

Let me know if you need more clarification.


Message Edited by KC CRM Analyst on 09-16-2008 08:26 PM
GanuGanu
Hi,
Try this,
 
IF( ISPICKVAL( 1picklist, "field value"), IF( ISPICKVAL(2picklist,"") ,true, false) , false)
then ur,
Error Message.
 
a.1picklist is a controling field,
b.2picklist is a depenent field,
try this in vali rule... I hope this vl help u!!
 
Thanks,
Ganesh