Problem with Landmark Transaction Node

 7 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Jessica M
Advanced Member Send Private Message
Posts: 34
Advanced Member

I am trying to create a process flow (in LPA) that will create a csv file with employee info (name, email, direct manager, address info).  I have a different landmark query node for each object I need to get data from (Employee, HROrganizationUnit, EmployeeContact, EmployeeAddress).  The first node which gets the employee number and name works.  In the subsequent queries, I was trying to use the employee number variable from the first query to select the data for the specific employee. 

If I use SingleRecordQuery, it will tell me the Employee Contact object doesn’t exist.  If I change to MultipleRecordQuery, it returns all the email address.  It seems to be ignoring the “Employee = “” value.

Am I not able to pass the variable from the first query into the following query nodes?  Can anyone offer any suggestions or tips?  I am fairly new to process flow and would greatly appreciate any suggestions.

Dave Lis
Advanced Member Send Private Message
Posts: 24
Advanced Member
Hi Jessica,

When using the subsequent queries are you using all the key values to access the record.  I think if you don't use the full key then you have to use the multiplerecordquery and then loop through the records unitl you find the one you want.  I'm not absolute about that but I think that's the case.

Dave Lis
Jessica M
Advanced Member Send Private Message
Posts: 34
Advanced Member
My first query is EmpQRY using ObjectName: Employee.

My second query to get email address:
_dataArea="ltm" & _module="hr" & _objectName="EmployeeContact" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _runAsUser="" & _pageSize=30 & Employee="" & HROrganization="" & ContactDetail.EmailAddress

When I test it, I get the following message:

complete: true
response message: null
record count: 0
has next: false
has previous: false
Results header string: ContactDetail.EmailAddress
Results string:

Communications trace
null

And it does the same thing for with the address query node.

Dave Lis
Advanced Member Send Private Message
Posts: 24
Advanced Member

When you read the Employee table get the HROrganization, Employee and other information you need and they try this. This should return all the contact rows for that employee.

_dataArea="ltm" & _module="hr" & _objectName="EmployeeContact" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _pageSize="30" & HROrganization="" & Employee=""0" &ContactDetail.EmailAddress

complete: true

response message: null

record count: 1

has next: false

has previous: false

Results header string: EmployeeContact>,0,ContactDetail.EmailAddress

Results string: ,,altest@atlanta.k12.ga.us

 

Communications trace

null

Dave Lis
Advanced Member Send Private Message
Posts: 24
Advanced Member

Oops!  My previous post was incorrect.  Sorry!

When you read the Employee table get the HROrganization, Employee and other information you need and they try this. This should return all the contact rows for that employee.

_dataArea="ltm" & _module="hr" & _objectName="EmployeeContact" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _pageSize="30" & HROrganization="" & Employee=""0" &ContactDetail.EmailAddress

complete: true

response message: null

record count: 1

has next: false

has previous: false

Results header string: EmployeeContact>,0,ContactDetail.EmailAddress

Results string: ,,altest@atlanta.k12.ga.us

 

Communications trace

null

Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member

Dave is correct - you have to include the full key for Landmark Single Record Queries.

Just for consideration, when you are querying the Employee BC, there are derived fields named "EmployeeWorkEmailAddress" and "EmployeeWorkTelephone", so you don't need to query EmployeeContact at all. 

If you need other fields from the EmployeeContact BC, you can use the Employee.UseForWorkEmail or Employee.UseForWorkPhone to get the related EmployeeContact.EmployeeContact (key) value for a Single Record Query against the EmployeeContact BC.

_dataArea="prodhcm" & _module="hr" & _objectName="Employee" & _actionName="Find" & _actionOperator="NONE" & _actionType="SingleRecordQuery" & _runAsUser="" & _pageSize=30 & HROrganization="{HROrganization}" & Employee="{EmployeeID}" & EmployeeWorkEmailAddress & EmployeeWorkTelephone & UseForWorkEmail & UseForWorkPhone

_dataArea="prodhcm" & _module="hr" & _objectName="EmployeeContact" & _actionName="Find" & _actionOperator="NONE" & _actionType="SingleRecordQuery" & _runAsUser="" & _pageSize=30 & HROrganization="{HROrganization}" & Employee="{EmployeeID}" & EmployeeContact="{Employee.UseForWorkPhone}" & ContactDetail.Telephone.SubscriberNumber & TelephoneType

Also, there are fields named "UseForMailing" and "UseForPayroll" which hold the related EmployeeAddress.EmployeeAddress (key) that you can use in a subsequent query against the EmployeeAddress BC.

_dataArea="prodhcm" & _module="hr" & _objectName="Employee" & _actionName="Find" & _actionOperator="NONE" & _actionType="SingleRecordQuery" & _runAsUser="" & _pageSize=30 & HROrganization="{HROrganization}" & Employee="{EmployeeID}" & UseForMailing

_dataArea="prodhcm" & _module="hr" & _objectName="EmployeeAddress" & _actionName="Find" & _actionOperator="NONE" & _actionType="SingleRecordQuery" & _runAsUser="" & _pageSize=30 & HROrganization="{HROrganization}" & Employee="{EmployeeID}" & EmployeeAddress = "{Employee.UseForMailing} & PostalAddress.DeliveryAddress.AddressLine1 & PostalAddress.DeliveryAddress.AddressLine2 & PostalAddress.Municipality & PostalAddress.StateProvince & PostalAddress.PostalCode

 Good Luck!  Kelly

Kelly Meade
J. R. Simplot Company
Boise, ID
Jessica M
Advanced Member Send Private Message
Posts: 34
Advanced Member
Thanks so much for the info!

I'm just curious, what are the benefits of a single record query vs a multiple record query?  I'm just trying to understand the appropriate times to use each. 
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
If you know all the key fields (so you are looking for a single record) then the Single Record Query is the way to go. It is quick, and it will return the specific data you are looking for. Generally, these are faster than multiple record queries. NOTE: This will throw an exception (error) if a record isn't found for the keys entered.

If you don't know all the keys, or if you are wanting multiple records based on a partial key (i.e. you want to examine and/or utilize all the EmployeeContact records for an employee) then you can use a Multiple Record Query.

Also, if you use the Multiple Record Query it will not "error" on zero records as a Single Record Query will. Because of this, you can pass in a full key set and it will return zero records without erroring.

Finally, if you want to use a filter (which allows non-key data selection) then you will need to use Multiple Record Query. Note that filters are not very intuitive, so they require lots of trial and error. Unfortunately there is no builder for these yet.

I hope this helps.

Kelly
Kelly Meade
J. R. Simplot Company
Boise, ID