Ask Search:
Bethany SievertBethany Sievert 

Making Fields Required if Checkbox Is Checked

I'm trying to create a validation rule that would make two fields required if a checkbox is checked. If the checkbox is not checked, they don't need to be required. I've tried writing my formula, but can't figure out where I'm going wrong. 

Checkbox field: LPiPES__Available_for_Pledge__c
Required Fields: LPiPES__Pledge_Start_Date__c, LPiPES__Pledge_End_Date__c

My Formula: 
AND(
TEXT( LPiPES__Available_for_Pledge__c) VALUE=TRUE)),
                ISBLANK( LPiPES__Pledge_Start_Date__c) 
                ISBLANK( LPiPES__Pledge_End_Date__c)
)
Best Answer chosen by Bethany Sievert
Ahilesh RagavanAhilesh Ragavan
Try this formula:
AND(
LPiPES__Available_for_Pledge__c = TRUE,
OR(
      ISBLANK( LPiPES__Pledge_Start_Date__c),
      ISBLANK( LPiPES__Pledge_End_Date__c)
)
)

 

All Answers

Ahilesh RagavanAhilesh Ragavan
Try this formula:
AND(
LPiPES__Available_for_Pledge__c = TRUE,
OR(
      ISBLANK( LPiPES__Pledge_Start_Date__c),
      ISBLANK( LPiPES__Pledge_End_Date__c)
)
)

 
This was selected as the best answer
Deepak AnandDeepak Anand
Like this = 
AND(
    LPiPES__Available_for_Pledge__c = TRUE,
    OR(
        ISBLANK(LPiPES__Pledge_Start_Date__c),
        ISBLANK(LPiPES__Pledge_End_Date__c)
    )
)
Naveen DhanarajNaveen Dhanaraj
Like This,
AND(
LPiPES__Available_for_Pledge__c = TRUE,
OR(
   ISBLANK( LPiPES__Pledge_Start_Date__c), 
   ISBLANK( LPiPES__Pledge_End_Date__c)
)
)
OR
AND(
 LPiPES__Available_for_Pledge__c = TRUE,
 ISBLANK( LPiPES__Pledge_Start_Date__c), 
 ISBLANK( LPiPES__Pledge_End_Date__c) 
)


 
Bethany SievertBethany Sievert
Thank you all! The first formula worked.