2 Replies Latest reply on Dec 1, 2018 7:13 AM by tpratt

    Calculation works only for already created Objects - object attributes not available on initial creation

    tpratt Apprentice

      I think I've run into a similar issue in the past with new items in a collection (when adding get all items except the latest). What I am trying to do is simply use a calculation upon initial creation of an Incident to determine the initial assignment group. Our current process assigns all incidents the the Service Desk for triage. However - as we have added more and more incidents thru Event Manager where we know the correct assignment group - I want to change that. The first screen snip below is the beginning part of the process .. and the calculation has been written to use on the assignment object identified below (assign to Service Desk).



      The calculation works as I expect for existing incidents (thru the testing stage) - but once executed as part of the process the calculation is not able to "see" any of the attributes on the newly created object. I've copied my calculation below - it appears a bit "funny" because I just used a different Group Name in each conditional check as a debugging tool (depending on the group assigned I can easily tel where the code branched). If I "test" the calculation on various assignment objects - it will follow the logic and return the Group Object based on the "Source" and then the "Category" attributes. But - when creating a New Incident (either on WebDesk manually or via Event Manager (the templates for Event manager set the source to Alert and the Category).- only the default value is used (E-Commerce). This shows me that the Incident Object does not exists at this point in the process (or at least i can;t access it by looking up the GUID).


      I'm 99.9% sure that I will not be able to make the assignment in this way (I may go and put in a new Status (pre-assignment) - and then ad a process automatic action to then runt the same calculation on a process assignment. But as/before I make this type of change I wanted to see if anyone had a similar experience and/or could confirm what I believe is happening.


      Much appreciated,




      Bigger Picture of the calculation code - in case above is hard to read: