function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Renee KroonRenee Kroon 

Formula Update add dates in the future

I have this formula: 

IF(ISBLANK(AVTRRT__End_Date__c ), (AVTRRT__Start_Date__c <= TODAY()) , (AVTRRT__Start_Date__c <= TODAY() && AVTRRT__End_Date__c >= TODAY()))

But the problem is that any placement with a date in the future is not included.
How do I change the formula to get startdates in the futurealso included?
Best Answer chosen by Renee Kroon
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Renee,

You can try the below formula field.
 
IF(ISBLANK(AVTRRT__End_Date__c ), NOT(ISBLANK(AVTRRT__Start_Date__c)) , NOT(ISBLANK(AVTRRT__Start_Date__c)) && AVTRRT__End_Date__c >= TODAY()))
Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,

 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Renee,

Is this formula in validation rule?

Thanks,
 
Renee KroonRenee Kroon
This is a formula for a tickbox field
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Renee,

This formula means  the field will be checked in these two conditions.

1) If enddate is null then start date should be greater than today.
2) if end date is not null then start date should be greater than today and enddate is greater than start date.

Can you confirm what should be the conditions now.

Thanks,
 
Renee KroonRenee Kroon
The box has to be ticked in these cases: 
1) If endate is null then start date should be less or greater than Today
2) if enddate is not null then end date should be greater than Today & start date should be less or greater than Today

In fact what we would like to see is if a candidate has an active placement, but also the one with a startdate which lays in the future.as these are now not included.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Renee,

You can try the below formula field.
 
IF(ISBLANK(AVTRRT__End_Date__c ), NOT(ISBLANK(AVTRRT__Start_Date__c)) , NOT(ISBLANK(AVTRRT__Start_Date__c)) && AVTRRT__End_Date__c >= TODAY()))
Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,

 
This was selected as the best answer
Renee KroonRenee Kroon
Thank you very much
Louis KeithLouis Keith
Can I use this formula in my service base website (https://channellettersbyus.com/) to show the date to which I receive a special order?
Alberta PradoAlberta Prado
Yes you can do it because I am using it on my website (https://chrisownbey.com/) that is similar to your website.
Alberta PradoAlberta Prado
I am looking for this type of formula to implement on my service base website. Website url is: https://repairs-in-servicecenter-uae.com/