0

Validation rule to execute only when the income implementation date is not null and income implementation date should be greater than year's limit effective date and less than 45 days from year's limit effective date

I am using below validation rule but it is executing when the income implementation date is null

  IF(NOT(ISBLANK(Year_s_Limit_effective_Date__c)) && NOT( ISBLANK(Income_limits_Implementation_Date__c 
   ))&& (Income_limits_Implementation_Date__c > Year_s_Limit_effective_Date__c && 
   Income_limits_Implementation_Date__c <= Year_s_Limit_effective_Date__c + 45),false,true)

1 Answer 1

2

Your validation rule uses && (AND) everywhere, so the fields are effectively required. Instead, you need some additional logic. I had to invert your logic so that it makes sense. Note that IF() is not appropriate here, as the result of OR, AND, and NOT are already Boolean values.

AND(
    NOT(
        OR(
            ISBLANK(Year_s_Limit_effective_Date__c),
            ISBLANK(Income_limits_Implementation_Date__c)
        )
    ),
    OR(
        Income_limits_Implementation_Date__c < Year_s_Limit_effective_Date__c,
        Year_s_Limit_effective_Date__c + 45 > Income_limits_Implementation_Date__c
    )
)
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .