Question if then.
Working on a taskmanager, I want to assign a value from a list (Status) to my enddate “(”too late“ or ”in time“). So when an enddate is < today () then assign value ”too late“ . When an enddate is > today then assign value ”in time“. The script is a trigger after update / change.
if Einddatum < today() then
Status := ”Too late“
else
if Einddatum > today() then Status := ”In time“ end
end
However this doesn”t work. Its doesn“t update the value when changing the endtime.
Any idea?
6 replies
-
Better use a formula field for this, no trigger needed with a formula field and change instantly.
if Einddatum < today() then “Too late” else “In Time”
Steven.
-
THANKS A LOT! and if I want a third options “not assigned” when the enddate is empty?
-
if Einddatum = null then “not assigne” else if Einddatum < today() then “Too late” else “In Time” end
-
Or,if you want to make it stylisch ;-)
if Einddatum = null then styled(“not assigned”,“orange”) else if Einddatum < today() then styled(“Too late”,“red”) else styled(“In Time”,“green”) end
Steven
-
Thanks!! The last version is excellent. Just what I needed!
-
Hans, graag gedaan, je weet mij te vinden als je nog hulp nodig hebt.
Content aside
- 4 yrs agoLast active
- 6Replies
- 367Views