I am having simple task of getting user's User Name and send that data in email.
I have a field which is 'Person and Group', and it is configured to 'Allow Multiple selections' as Yes. I am reading data of this column and sending in email through Nintex workflow.
In Email I am getting name of user as i:0#.w|abcd\ats.test; i:0#|abcd\ats.test2; i:0#|abcd\ats.test3
In that field I have three users and I am getting there Names in this way.
Then to fix this I used Nintex 'set variable' action and did exactly like below attachment.
Now when I am trying to print data of variable 'sbc-txt' I am getting error.
I came to know :
If I have only one user in field, I can get his User Name,
if I have two user in field, then I can get second person User Name
If I have three user in field, workflow will get terminate
Can any one please let know how to get user name of person who are in 'Person and Group' Column.
This should apply to both SPS and SPO. Do understand you don't have to do this to send an email. If it is a people or group field in SharePoint that is populated, you can reference that in the send email action and Nintex will know the correct email property to send the email to automatically.
click on the variable and be sure to select the people and group variable type
choose where the value will come from, in my example I did initiator but this could be any field that has that value of people from user profile
next select the "X" to choose how you want it displayed
Then hit okay and it should work.