Ask Search:
Sara CaseySara Casey 

Validation Rule on Event Tracking

Hi, I am trying to create a validation rule that staff would complete after a scheduled event takes place.  I have created a validation rule, but it's currently being required upon the event creation.  Here's what I have:
AND( 
 ISBLANK(  Participants__c ),
ISBLANK(  Exhibitors__c  ),
 ISBLANK( Professional__c ),
 ISBLANK( of_Dental_Brochures_Distributed__c ),
 ISBLANK( of_Quit_Plan_Brochures_Distributed__c )  
 
)
Since we won't have these numbers available when we create the event, it needs to be based on another field.  I would like it to read, if a value is entered in # of participants, then the other fields become required.  How could I edit my formula to make this happen?
Best Answer chosen by Sara Casey
Mayank SrivastavaMayank Srivastava
Sara, just use this:
AND( 
 NOT(ISBLANK(  Participants__c )),
 OR(
 ISBLANK(  Exhibitors__c  ),
 ISBLANK( Professional__c ),
 ISBLANK( of_Dental_Brochures_Distributed__c ),
 ISBLANK( of_Quit_Plan_Brochures_Distributed__c )  
 )
 )

That's it. Just that minor tweak and you will be good to go!

All Answers

Mayank SrivastavaMayank Srivastava
Sara, just use this:
AND( 
 NOT(ISBLANK(  Participants__c )),
 OR(
 ISBLANK(  Exhibitors__c  ),
 ISBLANK( Professional__c ),
 ISBLANK( of_Dental_Brochures_Distributed__c ),
 ISBLANK( of_Quit_Plan_Brochures_Distributed__c )  
 )
 )

That's it. Just that minor tweak and you will be good to go!
This was selected as the best answer
Mayank SrivastavaMayank Srivastava
Also, if you only want this rule to fire on existing records and not newly created records, use this instead:
AND( 
 NOT(ISNEW()),
 NOT(ISBLANK(  Participants__c )),
 OR(
 ISBLANK(  Exhibitors__c  ),
 ISBLANK( Professional__c ),
 ISBLANK( of_Dental_Brochures_Distributed__c ),
 ISBLANK( of_Quit_Plan_Brochures_Distributed__c )  
 )
 )

Use the one that best fits your requirements.
Sara CaseySara Casey
Thanks!  This is perfect!