1 Reply Latest reply on May 7, 2018 12:51 AM by Julian Wigman

    Setting dropdown based on RaiseUser atribute

    Brian.Subia Apprentice

      I work for a school district and we have different SLA based on staff or student. Normally we can set the IncidentUrgency of the user's ticket based on the Template we assign on the Dashboard link. I am working on a web form that our staff can use to Proxy a ticket for a student or another staff member. For this window I was hoping to be able to use a calculation that would set the Urgency based on the RaiseUser's EmployeeType. I placed the fallowing calculation on the window and have it set to "Before Save" but it is not updating the Urgency drop-down when the ticket is created. The dependence is RaiseUser. I have also tried setting the RaiseUser field on the window to "Is calculate on change".


      import System

      static def GetAttributeValue(Incident):

          Urgency = "Medium"

          if Incident.RaiseUser._EmployeeType == 's':

              Urgency = "Critical"

          return Incident.GetNamedObject("IncidentManagement._IncidentUrgency", Urgency)


      When I test the calculation against an existing ticket I get the correct value back.


      Any help would be appreciated.