IPA v11, - Get actor from Employee ID using LMRK node

 10 Replies
 2 Subscribed to this topic
 32 Subscribed to this forum
Sort:
Author
Messages
dcasper70
Basic Member
Posts: 14
Basic Member

    This should be easy, but drawing a blank...

    In an v11 IPA, I have an employee number and am I'm trying to get their corresponding Actor.

    I know how to do it in SQL, and I know how to find it in Rich Client, but for the life of me I can't figure out how to get the Actor value in an IPA for a given Employee.

    Woozy
    Veteran Member
    Posts: 709
    Veteran Member

      Hi dcasper70,

      Try querying Employee for field AgentEmployee.  Hopefully that will get you the answer.

      FYI - don't try filtering by this field because it will be VERY SLOW and consume huge resources.  If you have to do that,you're better off to do a SQL query on the gen side (if you have that option).

      Good Luck!

      Kelly

      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      dcasper70
      Basic Member
      Posts: 14
      Basic Member

        OMG!

         

        I was just about finished with an Agent>ParentAgent>Actor link that was behaving funky.  Your suggestion is a hellavalot simpler.

         

        Thank you sir!

        Woozy
        Veteran Member
        Posts: 709
        Veteran Member
          I've been there...UGH! I'm glad that will work for you.

          Kelly
          Kelly Meade
          J. R. Simplot Company
          Boise, ID
          SecurityAdmin
          Basic Member
          Posts: 4
          Basic Member
            What release is the AgentEmployee field introduced? We recently upgraded our Dev and Test environments to 11.0.2 and I do not see this field. Is this only for the Cloud based version?
            Woozy
            Veteran Member
            Posts: 709
            Veteran Member
              Hi Don,

              It has been around for a very long time - I think as long as Landmark/TM has been around, and it is not Cloud only (we are on-prem).

              FYI - This is NOT a physical field you can query using SQL. It is a derived/calculated field that is only available via a Landmark Query.

              I hope this helps.
              Kelly
              Kelly Meade
              J. R. Simplot Company
              Boise, ID
              SecurityAdmin
              Basic Member
              Posts: 4
              Basic Member
                Thanks Kelly, we've been on the system just short of three years and have been trying to determine the easiest way to pull the actor id(AD Account) associated with the employee id. I thought that I had read in some release notes for one of the Version 11 release notes there was a physical field but obviously I was mistaken. Currently our HR Department maintains the employee's AD account in the Alternate Employee Identification business class but they do not always remember to populate the field and on top of that, it's an encrypted field so you cannot use SQL Query to pull it if you need it. Would you mind providing me some insight on how this can be easily pulled? In the past I have pulled it by querying the Agent table via SQL but is there an easier/better way? We have multiple flows where this could come in handy.
                Woozy
                Veteran Member
                Posts: 709
                Veteran Member
                  The only way I've ever been able to get it is from Employee to Agent to Parent Agent.  Here's the query I use.
                  Note that this is DB2 SQL, so you may have to fiddle if you're on MSSQL

                  SELECT
                          emp.Employee
                          ,pag.ACTOR
                  FROM LMHCM.EMPLOYEE as emp
                      INNER JOIN LMHCM."AGENT" as ag
                          on AG.BORBUSINESSCLASSNAME = 'Employee'
                                  and AG.BORBUSINESSOBJECTKEY = emp.UNIQUEID
                                  and HEX(AG.DELETEFLAG) = REPEAT('0',32)
                          INNER JOIN LMHCM."PARENTAGENT" as pag
                                  on pag.PARENTAGENT = ag.PARENTAGENT
                                  and HEX(pag.DELETEFLAG) = REPEAT('0',32)
                  WHERE emp.HRORGANIZATION = 'whatever'
                          AND emp.Employee = whatever
                          AND HEX(emp.DELETEFLAG) = REPEAT('0',32)
                  FOR READ ONLY WITH UR 

                  Kelly Meade
                  J. R. Simplot Company
                  Boise, ID
                  SecurityAdmin
                  Basic Member
                  Posts: 4
                  Basic Member

                    Thank you Sir, that's essentially how I am pulling it now.   

                    dcasper70
                    Basic Member
                    Posts: 14
                    Basic Member
                      Woozy,
                      the second whatever is unquoted...


                      :-P
                      Woozy
                      Veteran Member
                      Posts: 709
                      Veteran Member
                        dcasper70 - Yep, it's unquoted because "Employee" is a numeric field - [decimal](13), but HROrganization is a string. :-)

                        Don - That is an issue, but if they are linking the wrong agent to the actor, then that's a bigger problem because they are linking a user to the wrong employee data which is a big No-No from a privacy perspective. In our case, the Actor and the Employee are suppposed to be the same root value (though Actor is string and Employee is numeric) so we audit heavily around that.

                        Kelly Meade
                        J. R. Simplot Company
                        Boise, ID