6 Replies Latest reply on Jan 23, 2018 2:42 AM by Mark6785

    using a calculation on a query

    Mark6785 Apprentice

      This seems like real basic stuff, but i'm struggling  

      I'm trying to use a calculation to create an extra column on a query.

      I thought the easiest way to do this would be create an attribute, put the calc in it and then add this to the query columns, is there an easier way?


      When I do this the column always comes up empty. The calculation is this:


      import System

      static def GetAttributeValue(Incident):

      Value =  Incident.CreationDate - Incident.IsBreached

      Value = "test"

      return Value


      Its supposed to just find the difference between the Creatin time and the breach time to show how much time the SLA has allowed for that job.

      I put the extra line in to just output "test" as a test in case the calc is wrong , but still no result seems to come out.


      Anyone know why this is?

      What would the "calculation type" be on the attribute?