Ask Search:
Nica Anouk SiegertNica Anouk Siegert 

Validation Rule for Date field in future or if blank

I need help with the final stretch. I'm sure I'm missing something super simple. I need the rule to fire when the field is a future date , not on the two defined record types (which it does) BUT also when it is left blank. I tried adding ISBLANK (Date_of_Incident_c) but that negates the above validations. How can I add the "blank field" into this:

AND(
IF(
OR(RecordType.DeveloperName = "Incidents",RecordType.DeveloperName = "Incidents_w/o_close_pg"), true, false)

,Date_of_Incident__c > TODAY () )

Thanks for your help!
Best Answer chosen by Nica Anouk Siegert
Deepak AnandDeepak Anand
Give this a shot:

AND(
OR(
RecordType.DeveloperName = "Incidents",
RecordType.DeveloperName = "Incidents_w/o_close_pg"
),
OR(
ISBLANK(Date_of_Incident__c),
Date_of_Incident__c > TODAY()
)
)

All Answers

Deepak AnandDeepak Anand
Give this a shot:

AND(
OR(
RecordType.DeveloperName = "Incidents",
RecordType.DeveloperName = "Incidents_w/o_close_pg"
),
OR(
ISBLANK(Date_of_Incident__c),
Date_of_Incident__c > TODAY()
)
)
This was selected as the best answer
Nica Anouk SiegertNica Anouk Siegert
Deepak, 
you rock! Thanks for your help and saving me time spinning wheels. Have a great day.