I have a custom object called Project. Within this object I have two important date fields – Finance Expiry date (Finance_Expiry_Date__c
) and Contract Expiry date (Contract_Expiry_Date__c
).
These two dates don’t always correlate. Priority is given to the date that is closest to expiry.
I want to create a formula field (Priority Date field
) which will show the date that is closest to expiry.
In summary:
- If
Finance_Expiry_Date__c
is less thanContract_Expiry_Date__c
,
thenFinance_Expiry_Date__c
becomes the priority date. - If
Contract_Expiry_Date__c
is less thanFinance_Expiry_Date__c
,
thenContract_Expiry_Date__c
becomes the priority date. - If
Finance_Expiry_Date__c
is missing,
thenContract_Expiry_Date__c
becomes priority date. - If
Contract_Expiry_Date__c
is missing,
thenFinance_Expiry_Date__c
becomes priority date.