3 Replies Latest reply on Jul 6, 2011 9:42 AM by gwsmith

    Precondition based on current user?


      In my Incident process, I have an "Assign to Self" action.  I'd like to hide that action if the incident is already assigned to the current user (they keep clicking on it, expecting it to go away).  I created a precondition and selected "Runtime value", but entered $CurrentUser$.  It doesn't work, but then I'm using a macro value instead.  Is this just wishful thinking?  Is there no way to create a precondition based on the current user or group?


        • 1. Re: Precondition based on current user?

          I suppose I could associate the User table with the Incident table (again) and name it AssignToSelfLastUser.  Then whenever anyone clicks the Assign to Self action, I record their user here and base the precondition on whether the Current Assigned User equals AssignToSelfLastUser.  That would work, but I hate to think of how much I'm cluttering up that database for simple little things like this.

          • 2. Re: Precondition based on current user?
            karenpeacock SupportEmployee

            Hi Grant


            I thought I had seen this working before so I tested it on 7.4 and I can get this to work ok.  The condition needs to be on the Current Assignment object (not on Current Assigned Analyst) and the attribute User selected.  Then set the comparison to Does Not Equal.  Then on the value type select Runtime Value.  When you get to Value you have an arrow to bring up a selector box.  From here you can pick "Specify a Macro for Control" and then select CurrentUser.


            This seems to do the trick on my system (I don't get to see the following action in my process unless the incident isn't assigned to me) so I hope this works for you.


            Best wishes


            • 3. Re: Precondition based on current user?

              Thanks!  I was able to get this working, although I had to create two conditions - one for when the Current Assignment User is null and another for when it's not the current user.