3 Replies Latest reply on Feb 26, 2018 4:58 AM by Julian Wigman

    Calculations on Automatic Action (Process Designer) not being calculated ServiceDesk v2017.1

    CHINKS Apprentice

      Is anyone aware of an issue whereby Calculations do not work when included in an Automatic Action.

      Known bug?

       

      1. Create a New Automatic Action (associate with window) - 'Amend Incident'.

      2. Add to Process flow.

      3. Double Click to Open the new Action to Reveal the Core Object Window and Right click to add a calculation to a string attribute...

           amend the calculation e.g. Value = "Sample Text" ...> return Value

      4. Save & Test...

       

      The Calculation will not work. however - I have calculations in place - that use the above method that are in place and working.

       

      It sounds like a bug - Does anyone have a workaround?

        • 1. Re: Calculations on Automatic Action (Process Designer) not being calculated ServiceDesk v2017.1
          Julian Wigman ITSMMVPGroup

          The only scenario that I definately know anout is when you create the process action and DONT associate with a window but that is not your case here as you say.

           

          I recall a similar issue on the forum a couple of months back but i couldnt find it when I searched. I dont see anything in the issues fixed list between 2017.1 and 2017.3 that might cause either.

           

          Interestingly I havent ever had an issue like this on any of the versions so far so strange that only some are affected.

           

          Could it be procedural; ie is there a difference maybe between process actions created on-the-fly via the process diagram toolbox versus those created beforehand in the Actions tree for the Module?  I tend to create my Actions in advance as a batch rather that on-the-fly method in the process diagram.

           

          Julian

          MarXtar Ltd

          • 2. Re: Calculations on Automatic Action (Process Designer) not being calculated ServiceDesk v2017.1
            CHINKS Apprentice

            Hi Julian,

            I'm coming to the horrible realisation that the order of events (Between status's) is not always the order in which they are linked? In that - I am counting the number of attachments (in a multi-attach Attachment attribute) Using the Calculation :-

             

             

            (sanz-tabs apparently)

            import System

             

            static def GetAttributeValue(Incident):

             

            Attached = 0

             

            if Incident._With3rdParty.Count !=null:

             

            for item in Incident._With3rdParty:

             

            if item._AttachmentCount >0:

             

            Attached += item._AttachmentCount

             

            return Attached

             

            Calculation seems to test correctly - the expected results are revealed.

             

            So I can only conclude that possibly the data has not been committed to the database by the time the calculation occurs!

             

            (In Progress) Status

            .

            .

            Automatic Windowed Action (Incident Object):

            [File Count] MY AUTOMATIC ACTION

            .

            .

            (With 3rd Party) Status

             

            What other method could I use?

            I want to count all the files within the With 3rd Party Collection

            Calculate the value into Incident._Attachmentson3P

             

            do the Same for With Customer and place the value into Incident._AttachmentsonWC

             

            a simple calculation Incident._Paperclip: (After Read)

            This is working...

             

             

             

            import System

             

            static def GetAttributeValue(Incident):

             

            Value = "<img style=\"border-width: 0px;\" src=\"../../images/icons_new/spacer.png\" width=\"16\" height=\"16\"></a>"

             

            if Incident._MultiAttachments.Count >0:

             

            Value ="<img src=\"../../images/icons_new/paperclip.png\" width=\"16\" height=\"16\">"

             

            //Value ="Incident"

             

            elif Incident._AttachmentsonWCc !=null:

             

            if Incident._AttachmentsonWCc >0:

             

            Value ="<img src=\"../../images/icons_new/paperclip.png\" width=\"16\" height=\"16\">"

             

            //Value = "Customer"

             

            elif Incident._Attachmentson3Pc !=null:

             

            if Incident._Attachmentson3Pc >0:

             

            Value ="<img src=\"../../images/icons_new/paperclip.png\" width=\"16\" height=\"16\">"

             

            //Value = "3rd Party"

             

             

             

            return Value

             

             

            Throw me a bone.

             

            Thanks :-)

            Colin.

            • 3. Re: Calculations on Automatic Action (Process Designer) not being calculated ServiceDesk v2017.1
              Julian Wigman ITSMMVPGroup

              You are on the right track there.

               

              In fact, up until recently the process execution order was a subject for dev work in 2018.x but Product Management have now pulled this idea as too risky, so we are stuck with this probably forever.

               

              Some success has been found in using "Latest()" in some scenarios though.

               

              Julian

              MarXtar Ltd