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.
Solved! Go 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).
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.
That way the property will be a start form variable in your workflow.
Thank you. I knew it was probably a simple process and I was just missing something.
This is a great video explaining the control. Thank you very much for pointing it out to me.