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
Local EdgeLocal Edge 

Assistance getting custom rule to work

I am trying to create a validation rule that specifies if a certain value is selected in one picklist field it forces the owner to make a picklist selection in another field before any changes can be saves.
 
Any help would be greatly appreciated.
 
Below is what I worked on but cannot get it to work: 
 
 
AND (
OR (
ISPICKVAL (  Current_SEM__c, "Yes") ) ,
ISPICKVAL (   SEM_TYPE__c, "Local" ),
ISPICKVAL ( SEM_TYPE__c, "Specter" ),
ISPICKVAL ( SEM_TYPE__c, "PYP Company" ),
ISPICKVAL ( SEM_TYPE__c, "Other Agency" ),
ISPICKVAL ( SEM_TYPE__c, "Do It Yourself" ),
ISPICKVAL ( SEM_TYPE__c, "Lead Aggregator" ),
ISPICKVAL ( SEM_TYPE__c, "Industry Specialists" )
)
Best Answer chosen by Admin (Salesforce Developers) 
BuellBuell
AND(
ISPICKVAL ( Current_SEM__c, "Yes" ),
ISPICKVAL( SEM_TYPE__c, "" )
)


Message Edited by Buell on 11-14-2008 09:21 AM

All Answers

BuellBuell
AND(
ISPICKVAL ( Current_SEM__c, "Yes" ),
OR( ISPICKVAL( SEM_TYPE__c, "Local" ),
ISPICKVAL( SEM_TYPE__c, "Specter" ),
ISPICKVAL( SEM_TYPE__c, "PYP Company" ),
ISPICKVAL( SEM_TYPE__c, "Other Agency" ),
ISPICKVAL( SEM_TYPE__c, "Do It Yourself" ),
ISPICKVAL( SEM_TYPE__c, "Lead Aggregator" ),
ISPICKVAL( SEM_TYPE__c, "Industry Specialists" )
)
)
 
You were close, just needed to move your first picval out of the OR() statement.
Local EdgeLocal Edge
This didn't work for some reason.
BuellBuell
What field do you want required when what field is selected?  What types of fields are they?
Local EdgeLocal Edge

When they select "Yes" in the Current SEM picklist I want it to require them to select one of the 7 options shown from the "SEM TYPE" picklist.

BuellBuell
AND(
ISPICKVAL ( Current_SEM__c, "Yes" ),
ISPICKVAL( SEM_TYPE__c, "" )
)


Message Edited by Buell on 11-14-2008 09:21 AM
This was selected as the best answer
Local EdgeLocal Edge
Outstanding! Thank you much.