views:

297

answers:

1

I would like to query an Employee by matching First and Last name. Ideally, I'd like to be able to specify that in one EmployeeQueryRq QBFC object.

I think I have a start:

Dim EmployeeQueryRq As IEmployeeQuery
EmployeeQueryRq = requestMsgSet.AppendEmployeeQueryRq()
EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameFilter.MatchCriterion.SetValue(ENMatchCriterion.mcContains)
EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameFilter.Name.SetValue(LastName)

Is there any way I can add an additional NameFilter to the same request? Or am I stuck walking a response list for the other criteria (albeit a smaller one limited to containing at least one value)?

A: 

It seems that employee is searched by the full name (the difference between directly using a fullname search and this is that this will allow a starts with or a contains) so if you concatenate the first and last name in the right order (unfortunately the order is not documented but it should match the full name, but that would require testing to confirm) you should get a first and last name search. What you can't really do is a first or last name search. Unfortunately that doesn't seem to be available.

Yishai
Yeah. I'm trying to avoid ordered concatenation because middle initials are definitely thrown into the mix, not everybody has one, and the database I'm getting my name criteria from doesn't store them.
Looks like you are stuck with a begins with last name and looping through the list to find your match. Fortunately the list of people with the same last name is going to be at least reasonable.
Yishai