cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

How to capture the display name of multiple people from a people/group column and insert in a notification?

Jump to solution

UPDATE: Click here for the detailed tutorial to answer this question.

Hello,

I have a people/group column on my form. Users are able to enter more than one employee name. I want to capture the Display Name (not the user name) of the people in this field in a variable and insert it in a notification. If I use the column itself the value would be something like i:0#.w|domain./username 1, /domain.com/username2 (domain is the SharePoint root of the company). I can capture the Display Name of the first employee in the field by using Query workflow action and storing it in a workflow variable but I cannot do that for other people in the list. As example if the domain is GoodCo.com and there are three people on the field e.g. John DoeBill Smith and Anna Kennedy if I insert the column directly in the notification I will get something like:

i:0#.w|GoodCo\jsmith;i:0#.w|GoodCo\bsmith;i:0#.w|GoodCo\akennedy

I can use Query User Profile and store the Display Name in a workflow variable but this will only capture the name of the first person. I appreciate your help.

Reply
6 Replies
Workflow Hero

Re: How to capture the display name of multiple people from a people/group column and insert in a notification?

Jump to solution

Hi,

You can achieve this as below.

1. I assume that users are in a variable in ";" separated.

2. Use "Regular Expression" action with "Pattern - ; ", "Operation = Splict", and "Input Text = multipleUsers" "Store result in = collUsers (variable)"

3. In a "For Each" action, take each user name in a variable, then use "Query User Profile" action to get user's "Name".

I have used the build string action to append each display name to a "multiline text varialbe". Let me know if you need any additional details.

Thank you.

Reply
Workflow Hero

Re: How to capture the display name of multiple people from a people/group column and insert in a notification?

Jump to solution

Hi Krishna Chaluvadi‌,

Thank you very much for sharing your input. How do you build the string inside the loop though? It will overwrite the text variable in the loop with the last user name. In my experience it keeps the display name of the last person. I might be doing something wrong. I'd appreciate it if you expand on this a little more.

Kindest regards,

Houman

0 Kudos
Reply
Workflow Hero

Re: How to capture the display name of multiple people from a people/group column and insert in a notification?

Jump to solution

I created a detailed illustrated article bout this if anyone needs more info on this:

https://community.nintex.com/docs/DOC-6605-how-to-capture-the-display-name-of-multiple-people-from-a...

0 Kudos
Reply
Workflow Hero

Re: How to capture the display name of multiple people from a people/group column and insert in a notification?

Jump to solution

use set variable action and configure proper 'return type'.

‌  ‌ return type‌

Reply
Workflow Hero

Re: How to capture the display name of multiple people from a people/group column and insert in a notification?

Jump to solution

Hi ,

Instead of Build String operation you can use Collection.

0 Kudos
Reply
Workflow Hero

Re: How to capture the display name of multiple people from a people/group column and insert in a notification?

Jump to solution

Thank you so very much for the answer and detailed tutorial.  I have looked for this for a while & I'll be happy to put it in place.

Reply