cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I want to query some values from two different lists.

Jump to solution

I am making a workflow that will read through all of the documents in a library and if they meet criteria send a notification to 3 various users that are responsible to review them. So in order to accomplish that I need to query some values from two different lists. My primary list has all of the document data including the business unit. The secondary list contains a business unit and 3 email addresses for each unit. When the workflow runs I want to be able to pass the 3 emails as variables to the TO field.  I can get Nintex to query the values from the primary list with a Query List, For Each and Set Variables for each item I need to pass. But when I try to bring in the values from the second list I don't return any values. The For Each is centered on the Document ID and I set the criteria so that the first email would be queried from the child lookup list.

This is the config for the variable that isn't working.

VariableScrnCap01.png

Any advice on how to get around this would be appreciated.

Labels: (1)
Tags (1)
0 Kudos
Reply
23 Replies
Automation Master
Automation Master

Re: I want to query some values from two different lists.

Jump to solution

I can see a different way to do the same thing. But before we look into that let's focus on what you have now. First question would be, What type of variable is TmpOwner? What type of field is Contact 01 - Email Address?

0 Kudos
Reply
Not applicable

Re: I want to query some values from two different lists.

Jump to solution

TmpOwner is a Person or Group type variable.

Contact01 - Email Address is a Person or Group field in the list and is set as an Email address in the variable assignment.

If you have another approach, please let me know. Thanks.

0 Kudos
Reply
Automation Master
Automation Master

Re: I want to query some values from two different lists.

Jump to solution

If both are people fields then you shouldn't have to set to bring in just the email property. I would do this if I was saving it to a Single Line of Text variable.

0 Kudos
Reply
Automation Master
Automation Master

Re: I want to query some values from two different lists.

Jump to solution

Alternatives could be that you have a multi select people picker field for that group. You could also have a single line of text field using the semicolon ; to split the addresses. If they are in separate fields in the lookup list, you could have them in any format and use a build string to combine the addresses together and put into one variable.

0 Kudos
Reply
Not applicable

Re: I want to query some values from two different lists.

Jump to solution

I tried removing the treat as Email condition at the variable and it doesn't seem to have made a difference.

The thing is that it's not returning any value at all. So I'm thinking that the problem is more in the matching up of the values in the Business Unit and TmpBusUnit. If those were matching I would expect that something, anything, would be returned. Because absolutely nothing is being returned it makes me wonder if those aren't matching up for some reason.

0 Kudos
Reply
Not applicable

Re: I want to query some values from two different lists.

Jump to solution

the second part of this idea will be very helpful once I get the values to pull in for any of the Business Units. But as it is now, I cannot get it to return any values at all, much less have the opportunity to combine all of them into one field.

I haven't yet figured out why no values are being retuned. I know I have a good matching value in the lookup table that contains the email addresses of those to be contacted.

Should I be applying a special format to the Equals - Workflow Data - TmpBusUnit?

0 Kudos
Reply
Automation Master
Automation Master

Re: I want to query some values from two different lists.

Jump to solution

The first thing I would do to troubleshoot is use the Log to History action to output the TmpBusUnit at the time of the query to check its value.

You could also have a query list action to query the Contacts List and output the Business Unit field into a collection variable. Then following it, use a Log to History action and put in the collection and verify the values. Obviously you should find a match at that point.

0 Kudos
Reply
Not applicable

Re: I want to query some values from two different lists.

Jump to solution

ok, so I added a Log in action into the For Each loop.

I added the TmpBusUnit individual variable and TmpIntBusUnit which is a collection from the previous List Query function. So it returned the correct responses for the Collection, but nothing for the variables within the For Each Loop.

TimeEventMessageOutcome
3/12/2015 11:21 AMWorkflow CommentTmpBusUnit
TmpIntBusUnits Kaelus China;EMC/RF Labs;
Owner
3/12/2015 11:21 AMWorkflow CommentTmpBusUnit
TmpIntBusUnits Kaelus China;EMC/RF Labs;
Owner
0 Kudos
Reply
Automation Master
Automation Master

Re: I want to query some values from two different lists.

Jump to solution

Ok, so it appears that comparing a list field called Business Unit in Contacts list will probably never equal

TmpIntBusUnits Kaelus China;EMC/RF Labs;Owner

Most likely it is one value like EMC/RF Labs.

Is the for each around the TmpBusUnit variable? if so then you should set the query filter to use the Current item(of the for each) variable and not the TmpBusUnit variable.

0 Kudos
Reply