
I wrote a formula that doesn't seem to work:
IF( AND( Eligibility_Start_Date__c <= Today(), OR( Eligibility_End_Date__c > TODAY(), ISBLANK( Eligibility_End_Date__c ) ), OR( Enrollment_Start_Date__c > TODAY(), ISBLANK( Enrollment_Start_Date__c ) ) ) , TRUE, FALSE)
Here's the logic - If stmt where 3 criteria must be TRUE:
1. Eligibility Start Date <=Today
2. Eligibility End Date > Today OR Null
3. Enrolled Start Date > Today OR Null
Any thoughts? Also, is there a formula editor out there that will allow me to see each expression and whether it equates to True or False (like the one in excel)? Thanks!
2 answers
Well, I guess this formula could be evaluated even without that as it is a basic date comparision! But still, if you want to evaluate each section independently, you change the Formula Return Type to TEXT and then do this:
IF( Eligibility_Start_Date__c <= TODAY(), "1", "0" ) +
IF( OR ( Eligibility_End_Date__c > TODAY(), ISBLANK( Eligibility_End_Date__c ) ), "1", "0" ) +
IF( OR ( Enrollment_Start_Date__c > TODAY(), ISBLANK( Enrollment_Start_Date__c ) ), "1", "0" )