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
EfrenEfren 

Field Update - If today falls b/w two date fields populate Current Program Field as True

Hi,

I've tried this a few different ways to make this work, but have been unsuccessful. My company has multiple program years for our clients. Most times, we are interested in pulling reports that are specific to the client's current program year. Unfortunately, not all program years start on the same date, and don't last the same length of time. 


I thought, with a "Current Program Year" identifier (checkbox) I would solve this. I would eliminate the need for users to keep this field up to date by using a Field Update Workflow. However, I just can't get it to work. If anyone can help, I'd greatly appreciate it:

 

IF(AND (Program_Year_Start_Date__c < Today(), Program_Year_End_Date__c > Today()), Program_Year_Status__c = True, null)

 

 

IF(AND (Program_Year_Start_Date__c < Today(), Program_Year_End_Date__c > Today()), True, null)

 

 

Program Year Start Date and Program Year End date are what we are comparing. If today falls between these two dates, then we are in the client's current program year. Current Program Year (i.e.., Program Year Status) should then be checked.

 

The syntax appears to be correct, but the the workflow doesn't work.

 

 

 

arizonaarizona
When does the field update get fired?
Rahul SharmaRahul Sharma

Are you updating Current Program Year checkbox from workflow field update?

As far as I know, Using the field update for checkbox, we can just set the value to true or false. We cannot use formula.

 

So if you are updating a text field then you may be correct.

Your formula seems perfect, just change it as below.

 

IF(AND (Program_Year_Start_Date__c < Today(), Program_Year_End_Date__c > Today()), 'True', '')