How would I rewrite the script to account for both [Program approved] and [Permanently Rejected] fields to be specific for dates below?
June2016 - May2017=2016
June2017 ? May2018=2017
June2018 ? May2019=2018
My current script is working but I need to account for 2018:
If([Customer - Utility]="ABC Energy" and (Date(2017,5,31)>=[Program approved] or Date(2017,5,31)>=[Permanently Rejected]),"2016","2017")
[Program approved] and [Permanently Rejected] are set up as Date field types. Both fields cannot be populated at the same time, so it�s either one or the other to determine the year.
The biggest issue I see so far is when I create a report based on year projects for 2018 will show up as �blank� while other will show �2016� or �2017�, but I know it because those 2018 projects have yet to be marked with a calendar date.
I would like it to default to the current year of �2018� if it is NULL.
var Date CriticalDate = Min([Program approved], [Permanently Rejected]); If($CriticalDate <= Date(2016,12,31), "2016", $CriticalDate <= Date(2017,12,31), "2017", $CriticalDate <= Date(2018,12,31), "2018", $CriticalDate <= Date(2019,12,31), "2019")