cancel
Showing results for 
Search instead for 
Did you mean: 
jaapsteenis
Nintex Newbie

How to Query for email address using Query List Lookup ?

Jump to solution

Could someone explain me what the standard way is to obtain the Email address of a person mentioned in User/Group column in a different Lookup List - using the Query List option ?

The way I am currently following seems to be very long as in the SP2010 it was a matter of a single action.

For example my Query List output gives me a result like this :

  [{"TerritoryManager":"test1.user@company.com"}]

How can I directly get to the email address ?

I noticed a couple of posts on this forum but they do not ring a bell to me.

 have used below approach, it works, but I am 100% sure it's not the most clever solution.

Who has better ideas :-) ?

Email From Lookup Value User Group

Thanks

Labels: (1)
Reply
5 Replies
Nintex Employee
Nintex Employee

Re: How to Query for email address using Query List Lookup ?

Jump to solution

Hi Jaap,

I believe the data you will receive from the Query List action will be a collection type. To access data from the collection, you can use the Get an Item from a Dictionary action which will be a little more certain.

As an example, I retrieved the Modified By column of my document using the Query List and when I log the output I see:

[{"Editor":{"EMail":"user@mytenant.onmicrosoft.com"}}]

I can then use the Get an Item from a Dictionary action to retrieve the data:

I think in your case your path will be different, e.g. TerritoryManager or (0)/TerritoryManager (I am not exactly sure the reason your data is different to mine, possibly I have not setup Query List as you have).

You should then see the value populate into the Email variable, which in my case is a string variable.

The help.nintex article also has other example formats for working with dictionary types.

 

Hope this helps.

Callum

Reply
jaapsteenis
Nintex Newbie

Re: How to Query for email address using Query List Lookup ?

Jump to solution

Thanks Callum, I have tried the following from the get Dictionary action but no joy.

The value I am feeding in is :  [{"TerritoryManager":"test.user@company.com"}] 

This is the result of a QueryList action based on a simple text column with email address given as test.user@company.com

When I use the Get Dictionary with the phrase (0)/TerritoryManager it stumps.

As per Help document it shouldn't be far from reality :-)

So still my substring fiddle is working but feels like it can be done with 1 action.

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: How to Query for email address using Query List Lookup ?

Jump to solution

Hi Jaap,

I have tried a similar query as yourself (single line of text field rather than people field), I was able to output the email address as a result:

[{"TerritoryManager":"test@domain.com"}] is my input data, in a collection type variable that has come from a Query List action

In my get from dictionary action, I have set the Query List output collection variable as the input dictionary

my path is (0)/TerritoryManager

Output is a text variable

When I log the text variable, I correctly get the email address of the user.

When you run the workflow, what is happening, are you getting no output email address in the variable, or is the workflow suspending with an error?

Callum

Reply
jaapsteenis
Nintex Newbie

Re: How to Query for email address using Query List Lookup ?

Jump to solution

Not sure what happened but your telepathy brought it to work here on my desk.

So confirmed working now with you solution above.

Thanks for heads-up

Jaap

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: How to Query for email address using Query List Lookup ?

Jump to solution

No problem, glad this helped.

Reply