brianknight
Explorer

Extract email address from People control

Jump to solution

I am trying to extract the email address of the People Control from a form within NWC.  I noticed the control is a collection variable so I used the loop to capture the item and I dropped that information into a variable where I displayed it in the log. I needed to see what it really was. Ultimately, I want to take this email address and perform Create Item with on Prem Sharepoint.  If I am able to extract the email address from this control, I will be able to drop it into a People column in Sharepoint.  So here is what I see when I drop the contents into a variable.

{"lastName":"XXXX","mail":"email.address@XXXX.org","firstName":"XXXX","displayName":"XXXX XXXX","id":"auth0|614269949dab75006817515c","tooltip":" XXXX XXXX\nEmail: email.address@XXXX.org\nLogin: auth0|614269949dab75006817515c","source":"vibranium"}

 

This is my first foray into NWC.  In Nintex for Sharepoint, the process is quite simple.  I'm sure I am just missing how to do this.  I'm thinking get string might be the way to get to what I am looking for, but I am just unsure how to set up the formula.  I'm hoping someone knows the best way to get to this information. Thank you.

0 Kudos
Reply
4 Replies
leighburke
Nintex Employee
Nintex Employee

Re: Extract email address from People control

Jump to solution

@brianknight If you use the  loop for each action(https://help.nintex.com/en-US/nwc/Content/Designer/Actions/LoopforEach.htm) you will have access to the different properties of the collection(see below).

leighburke_0-1643330155551.png

 

0 Kudos
Reply
Gavin-Adams
Explorer

Re: Extract email address from People control

Jump to solution

Hi @brianknight ,

couple of other ways in addition to the for each from @leighburke 

 

Get item from collection action with an index of 0 (zero), will get you the first item in the collection and can set it to a variable.

The other method and probably the better way given it does not use additional workflow actions is to use a variable on the form.

Euan previously did a video on this one. https://youtu.be/gAP7asv7YDg 

 

Basically it's still a collection on the form use a converttostring function wrapped around the control variable to set the value of a form variable.

 

convert to string people.png

 

That way the property will be a start form variable in your workflow.

 

In this video, we take a look at the soon-to-be-released People control for Nintex Workflow Cloud Forms.
Reply
brianknight
Explorer

Re: Extract email address from People control

Jump to solution

Thank you. I knew it was probably a simple process and I was just missing something.

0 Kudos
Reply
brianknight
Explorer

Re: Extract email address from People control

Jump to solution

This is a great video explaining the control.  Thank you very much for pointing it out to me.

Reply