3 Replies Latest reply on Aug 6, 2018 6:19 PM by AlasdairRobertson

    How to get field from Employee object in Service Request when referenced through a parameter

    BeckD Rookie

      Hi, please bear with me as I am very new to this.

       

      I have a request offering with a drop down that uses the Employees picklist to allow the user to select an employee. This displays the Display Name for the employee, but appears to store the login ID.

       

      In the workflow of the request I am generating a task. In the task details I would like to include the name of the employee that was selected, but when I reference the parameter using GetSRPValue I can only seem to get the loginID. Is there some special syntax I need to use to get the Display Name, or do I need to go down the path of finding the employee object where the login ID = the request parameter?

        • 1. Re: How to get field from Employee object in Service Request when referenced through a parameter
          AlasdairRobertson ITSMMVPGroup

          Hi

           

          This breaks down into 2 elements, firstly the pick list storing the Login ID, in the Admin UI under the build menu you will find Pick Lists, I am assuming you chose something like the Employee list:

           

           

          Here you can see the displayed field is Display Name but the stored field is Login ID.

           

          The second part is configured on the Request Offering, I will give you the basics of how to get the additional data here but there are a number of ways to get the data from an employee record one you have their login or RecId outside of Request Offering as well.

           

          On the Request offering field for your employee select you validation list (Employees) and towards the bottom is another action called additional fields:

           

           

          Here you can specify other fields to grab from the employee record:

           

           

          Not you have these values you can use them with other fields:

           

           

          I hope this helps shout if you get stuck.

          1 of 1 people found this helpful
          • 2. Re: How to get field from Employee object in Service Request when referenced through a parameter
            BeckD Rookie

            Thanks AlasdairRobertson

             

            I have added the Display Name to the additional fields of the relevant field, but do I now have to create other hidden fields to be set to this value before I can use it in the expression to set the details of the task, or can I reference it directly somehow?

             

            So what I mean is on my request offering I have a field called Manager which selects from the Employee's picklist, exactly as you showed in your screenshots.

            Now in the Fullfillment tab I have an Extended Task workflow element and I want to set the details field to the Manager's display name. If I use

             

            $("Manager: " + GetSRPValue(recid, ddManager))

             

            as the expression where ddManager is my field, I only get the login ID. I need the Display Name.  So should I be creating another hidden field txtMgrDisplayName and setting it to the Display name for the ddManager field?

            • 3. Re: How to get field from Employee object in Service Request when referenced through a parameter
              AlasdairRobertson ITSMMVPGroup

              Yes, that is correct create label or text fields hidden on your form to capture the values form the associated elements.  You can then call these in a workflow within the Request Offering.

               

              As I said there are a number of ways to capture these details off form if you have the RecId captured somewhere, you can use the EvalField() function, or you can start to play around with grabbing data via direct relationships just takes a little more practice but I use the method you are using quite a lot as it is easy for a customer to follow along with and make changes themselves to workflows without having to delve into the back end too much.

              1 of 1 people found this helpful