Landmark Transaction query question

 3 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Jessica M
Advanced Member
Posts: 34
Advanced Member
    I have created a process flow to create an employee information file that will be sent to a vendor.  They need the employee number of each employees manager.  I have been told by our HR manager to use the Direct Supervisor number to get the managers employee number.  As far as I can tell, Employee.DirectSupervisor relates to WorkAssignment.AssignmentIsSupervisor.  

    Landmark transaction string:
    _dataArea="ltm" & _module="hr" & _objectName="WorkAssignment" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _runAsUser="" & _pageSize=30 & AssignmentIsSupervisor="" & HROrganization="100" & Employee

    ** Supervisor = Employee.DirectSupervisor

    It returns all employee numbers, ignoring the AssigmentIsSupervisor.  I assume this is because I'm not passing all the key fields (Employee, HROrganization, WorkAssignment) - but I wouldn't pass Employeee as that is the field I need to find. 

    Is there a better way to find the managers employee number?  Is there something I'm missing in my query string?  I would appreciate any suggestions.

    Woozy
    Veteran Member
    Posts: 709
    Veteran Member
      Hi Jessica M,

      You could do it that way, but I generally use the "DirectSupervisorEmployee" field on the Employee business class:

      _dataArea="[prodline]" & _module="hr" & _objectName="Employee" & _actionName="Find" & _actionOperator="NONE" & _actionType="SingleRecordQuery" & _runAsUser="" & _pageSize=30 & HROrganization="[HROrganization]" & Employee="[Employee]" & DirectSupervisorEmployee

      However, if you have supervisor roles with multiple incumbents, then this will only return the "lowest" supervisor employee ID for that employee.

      If you need all the supervisor employee numbers, then you can do what you tried, but you have to use a "filter" (on the "Properties" tab) since that field isn't a key:

      _dataArea="[prodline]" & _module="hr" & _objectName="WorkAssignment" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _runAsUser="" & _pageSize=30 & _filterString="AssignmentIsSupervisor=\"[Supervisor]\"" & HROrganization="[HROrganization]" & Employee

      Note that filters can be finicky, at least in our version (9.2.5). The entire filter has to be wrapped in quotes, and any values also have to be wrapped in quotes, but each of those interior quotes must have a leading backslash (\).

      I hope this is helpful. Good Luck!

      Kelly
      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      Jessica M
      Advanced Member
      Posts: 34
      Advanced Member
        Thank you Kelly!  The filter worked.  I appreciate your help.
        Woozy
        Veteran Member
        Posts: 709
        Veteran Member
          Yay! I'm glad it worked for you.
          Kelly Meade
          J. R. Simplot Company
          Boise, ID