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
Carrlos BoydCarrlos Boyd 

Validation rule to complete required fields

I need a validation rule that states that if a checkbox is checked, two picklists and one user lookup must be filled out. The problem with what I created is that even though I select an option for both picklists and choose a user, I still get my error message. Here is the code:
AND( 
 My_checkbox__c = TRUE, 
 OR( 
 ISPICKVAL(My_first_picklist__c, ""), 
 ISPICKVAL(My_second_picklist__c, ""), 
 NOT(ISNULL(My_user__c)) 
 ) 
)
What am I doing wrong?
Best Answer chosen by Carrlos Boyd
Sagar PatilSagar Patil
Try this,
AND( 
       My_checkbox__c, 
       OR (
               ISBLANK( TEXT(My_first_picklist__c) ), 
               ISBLANK( TEXT(My_second_picklist__c) ), 
               ISBLANK(My_user__c) 
           ) 
    )