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
meighanmeighan 

Validation Rule: Lookup Field Required if Picklist selected

I have 3 fields that must be filled out on all accounts, either the three fields for Division A or Division B.  Two are picklists that are dependent upon each other, so that is set. I still need to find out how to make two rules one that requires A or B Lookups, another that connects the lookups to the picklists.

 

Either Division A Lookup or Division B lookup must be filled out. 

 

 

if Division A Lookup is filled out Division A Picklist 1 must be filled out also.  If Division B Lookup is filled out then Division B Picklist 1 must be filled out also.

Steve :-/Steve :-/

Are you looking for something like this?

 

AND( ISPICKVAL(PicklistField_A__c, ""), LEN( LookupField_A__c ) > 0)

 

AND( ISPICKVAL(PicklistField_B__c, ""), LEN( LookupField_B__c ) > 0)

 

 

 

 

Steve :-/Steve :-/

These ones might work better for you:

 

VR1: Make either Lookup A or Lookup B required

 

OR(AND( LEN(Lookup_A__c ) < 1, LEN(Lookup_B__c ) < 1))

 

 VR2: Make Picklist A required if Lookup A chosen, or Picklist B required if Lookup B chosen.

 

OR( AND(ISPICKVAL(Picklist_A__c, ""), LEN( Lookup_A__c ) > 0), AND(ISPICKVAL(Picklist_B__c, ""), LEN( Lookup_B__c ) > 0))

 

 Lemme know if they work for you. 

 

Oh yeah, and if they do, you owe me a beer! 

http://beeradvocate.com/beer/profile/863/7971

 

Cheers! ;-)

 

 

 

 

netTrekker_ADnetTrekker_AD

Youre really trying hard for some Pliny arent you?

 

At least this time the user is in Utah which is closer to the states that have distributors of it than you and I! 

Steve :-/Steve :-/
You'd think with Salesforce being located out in the SF that they'd be able to hook us up...  (sigh) 
netTrekker_ADnetTrekker_AD

No, they will probably tell you that you will have to pay ten bajillion dollars to go to Dreamforce to get some...

 

Sorry to highjack this question!

 

(but if anyone reading this can get Pliny the Elder or Pliny the Younger, please let us know!)

Steve :-/Steve :-/
Well they're both worth it (Pliny and Dreamforce) if you do go to DF'10 this place in Berkley is also worth checking out> http://www.jupiterbeer.com/jupiter/