3 Replies Latest reply on May 11, 2013 4:07 AM by Adam Wilden

    Calculation to copy categories to Process

    Adam Wilden Expert



      Our Workload lists need to be based on process to include different classes so up until now we've used copy rules to copy category titles to a "cat" field within Process.


      This means we need to show the "Cat" field on WebAccess as copy rules don't work (at least on 7.4) if not shown.  But I've been asked if we can remove this to simplify the screen so have decided it's time to move to a calc instead.


      Am trying the following - it's not giving any errors but it is returning nothing.  I've removed all windows copy-rules and restarted IIS...


      Any ideas?  (I've never tried calling a value from a class before so may be totally wrong).


      import System
      static def GetAttributeValue(Process):
       Value = '---'
       if Process.Class.Name == 'Incident':
        if Process.Category != null:
         Value = Process.Category.Title
       return Value
      (Dependency = Class)


      Once I get this working I will add clauses for Change and Problem etc...