0

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

null
    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    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.

    • Hans_van_den_Herik
    • 3 yrs ago
    • Reported - view

    THANKS A LOT! and if I want a third options “not assigned” when the enddate is empty?

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    if Einddatum = null then “not assigne” else if Einddatum < today() then “Too late” else “In Time” end

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    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

    • Hans_van_den_Herik
    • 3 yrs ago
    • Reported - view

    Thanks!! The last version is excellent. Just what I needed!

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    Hans, graag gedaan, je weet mij te vinden als je nog hulp nodig hebt. 

Content aside

  • 3 yrs agoLast active
  • 6Replies
  • 364Views