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
gregj777gregj777 

Validation rule but when NONE is selected doesn't save

I am trying to setup a validation rule but when the picklist  field is populated with ---None--- it will allow to save. See below. What do you need to add to the formula so you can save it.

 

Rule NameError_message_on_SE_Pkg_typeActiveChecked
Error Condition FormulaOR(ISPICKVAL(Type, "KSYMP Pkg - Single Event"), 
ISPICKVAL( Type,"Road Show Pkg - Single Event"), 
ISPICKVAL(Event_Package__c, "2012 KSYMP Custom"), 
ISPICKVAL(Event_Package__c, "2012 KSYMP Gold 30"), 
ISPICKVAL(Event_Package__c,"2012 KSYMP Partner 70"), 
ISPICKVAL(Event_Package__c,"2012 KSYMP Platinum 50"), 
ISPICKVAL(Event_Package__c,"2012 KSYMP Silver 15"), 
ISPICKVAL(Event_Package__c,"2012 KSYMP Single"), 
ISPICKVAL(Event_Package__c,"2012 Road Show Custom"), 
ISPICKVAL(Event_Package__c,"2012 Road Show Gold 15"), 
ISPICKVAL(Event_Package__c,"2012 Road Show Partner 35"), 
ISPICKVAL(Event_Package__c,"2012 Road Show Platinum 25"), 
ISPICKVAL(Event_Package__c,"2012 Road Show Single"), 
NOT(ISPICKVAL(Event_Package__c,"")))
Error MessageNot required on Package Single Event type.Error LocationEvent Package
DescriptionThis validates that field is not required on Single Event Package types.
  
Steve :-/Steve :-/

How about?

 

AND(
NOT(OR(
ISPICKVAL(Type, "KSYMP Pkg - Single Event"), 
ISPICKVAL( Type,"Road Show Pkg - Single Event"))), 
ISBLANK(TEXT(Event_Package__c)))

 

 

Steve :-/Steve :-/

or

 

AND(
OR(
TEXT(Type) <> "KSYMP Pkg - Single Event", 
TEXT(Type) <> "Road Show Pkg - Single Event"), 
ISBLANK(TEXT(Event_Package__c)))

 

gregj777gregj777

Sorry neither of those work. Maybe because Event_Package__c is a picklist?

Steve :-/Steve :-/

I tested both of them on my Dev SFDC org and they worked.  What is happening on your SFDC org?  Are you getting an error?