Hi All,
Well I just moved to a new job and I am having to start from scratch on a traffic light for a new company. Since the link is in the FAQ is dead, can someone help me out with the code? Here is what I have.
Objectives:
1.
2.
3.
Custom Fields:
day to traffic light (Text1)
Traffic Light (Text2)
Standard Fields:
Finish (built in variable) = [Finish]
Deadline (built in variable) = [Deadline]
Indicators:
"green" = green circle
"yellow" = yellow circle
"red" = red circle
Code:
days to traffic light (Text1):
Traffic Light (Text2):
What am I doing wrong?
Thanks,
Mike
Well I just moved to a new job and I am having to start from scratch on a traffic light for a new company. Since the link is in the FAQ is dead, can someone help me out with the code? Here is what I have.
Objectives:
1.
If field [deadline] is greater than or equal to the finish date = "green" (essentially if the deadline date is the same day as the finish day or after the finish date then the indicator will be green since it isn't past due)2.
if field [Finish] is greater than the [deadline] but no more than 29 days = "yellow" (essentially the traffic light will show yellow if the finish date is 1 - 29 days beyond the scheduled due date.3.
if the [finish] is 30 days or greater than the [deadline] = "red" (essentially if the finish date is over 30 days passed the deadline, the indicator will be red)Custom Fields:
day to traffic light (Text1)
Traffic Light (Text2)
Standard Fields:
Finish (built in variable) = [Finish]
Deadline (built in variable) = [Deadline]
Indicators:
"green" = green circle
"yellow" = yellow circle
"red" = red circle
Code:
days to traffic light (Text1):
Code:
IIf([Deadline]>99999,'No Deadline',DateDiff('d',[Finish],[Deadline]))
Traffic Light (Text2):
Code:
Switch([Text1]=([Deadline]>[Finish]),"green",
[Text1]=([Deadline]=[Finish]),"green",
[Text1]=([Deadline]<[Finish]),"yellow",
[Text1]([Deadline]<([Finish]+29)),"yellow",
[Text1]=([Deadline]<([Finish]+30)),"red")
What am I doing wrong?
Thanks,
Mike