4 Replies Latest reply on Aug 20, 2018 10:20 PM by Donna

    Expression help - relationship

    Donna Apprentice

      I know this expression is not quite right and wanted a little help - the intention is to change the style

      on a task list based on whether the customer of the parent ticket is a VIP and what the parent ticket is.

       

       

      $(if ParentLink_Category == "Incident"

        then "NormalBold"

         else if (customerofparent[Employee#.]VIP)

                then "VIPTask"

                        else if ParentLink_Category == "Incident" && (customerofparent[Employee#.]VIP)

                               then "VIPnIncSD"

        else "Normal")

       

      I am sure the relationship for (customerofparent[Employee#.]VIP) is not right - would someone help me out please?

      thanks

      Donna

        • 1. Re: Expression help - relationship
          crispr_bacon Apprentice

          HEAT Service Management Online Help This provides some info on the syntax for the relationships.

           

          It's not very clear what you are attempting to achieve, but I think showing how this would work with MasterIncident should be the same thing, you parent object may not be called MasterIncident.

           

          So being on a child incident, linked to a master. I'd want to pull down the VIP status of the Master's profile user. So it goes Child Incident > Master Incident > Profile(linked to master)

           

           

          [RelSpecifier1][RelSpecifier2][RelSpecifier3]FieldName

           

           

          So to step into that relationship first, you use the whole relationship key...

           

          [Incident#.MasterIncident]

           

          Then from Master to Customer (Through ProfileLink)...

           

          [Frs_CompositeContract_Contact#.IncidentAssociatedCustomer]

           

          Then the field since we are now at the object.

           

          VIP

           

          Putting that together...

           

          [Incident#.MasterIncident][Frs_CompositeContract_Contact#.IncidentAssociatedCustomer]VIP

           

          In Testing:

           

          • 2. Re: Expression help - relationship
            Donna Apprentice

            customerofparent is a calculated field - its is calculated from

            $(if ParentLink_Category == "Service Request"

              then [ServiceReq#.]ProfileLoginId

              else if ParentLink_Category == "Incident"

                   then [Incident#.Rev3]ProfileFullName

                   else "")

             

            about any task I wish to highlight it is task parent customer is a VIP whether or not it is an incident or not

             

            the result should be that task highlights if:

            the task parent is an incident = bold task number

            the task parent is an incident and customer of the parent ticket is a VIP = bold task number on a mauve background

            the task parent has a customer of the parent ticket who is a VIP = task number on a mauve background

            otherwise it is default.

             

            now I am wondering if adding another calculated field in Task that identifies whether the customer of the parent ticket is a VIP

            • 3. Re: Expression help - relationship
              DTurner Expert

              Hi Donna,

               

              If 'customerofparent' is a field, I am not sure if 'customerofparent[Employee#.]VIP' is a valid reference, so I ignored that field

              The following expression should help but it doesn't have the style names in because I'm lazy... but I'm sure you can fill in the blanks

               

              $(Case ParentLink_Category

                 when "Incident" then

                        (If [Incident#.Rev3][Frs_CompositeContract_Contact#.IncidentAssociatedCustomer]VIP then

                             <BOLD + MAUVE>

                        else <BOLD>)

                 when "ServiceReq" then

                        (If [ServiceReq#.InternalTask][Frs_CompositeContract_Contact#.ServiceReqAssociatedCustomer]VIP then

                             <MAUVE>

                         else <DEFAULT[?]>)

                 else <DEFAULT>)

               

              I think your requirement for "the task parent has a customer of the parent ticket who is a VIP = task number on a mauve background" would be more involved because ParentLink does not have a static relationship and is set on creation of the task record which is why I first use a case statement for the parent and then use the specific relationship specifier for that object in the expression above.

               

              Dec

              • 4. Re: Expression help - relationship
                Donna Apprentice

                I had a little drama because task and Service Request didn't have a relationship until I made one.

                But it works well now

                thanks