Skip to main content

I have a variable in a workflow that is of the type "Person or Group".

The initiator of the workflow selects the names that they want to assign the task to using this variable on the start form.

I am trying to capture the Display names of the people they have selected.

My intention is to write the names of the assigned personnel in a message that is emailed to a supervisor.

I cannot find a way to capture the Display names.

I can set another variable of type "Single line of text" to the content of the Person variable by using the Set Variable command without coercing it to Display Name.

But when I try to set the Text variable to the Display Names

 

17522i76BF51B6CB379246.jpg

 

I get "Coercion Failed: Unable to transform the input lookup data into the requested type."

And when I try to set the variable to just Display Name …

17520i7920EAC7D02DD593.jpg

I get ONLY the Display Name of the last person entered on the form.

Is there anyway to capture ALL the Display Names of all the people selected in a Start Form Variable?

Yes, there is a way to get all the names from the field and transform them into their display names.



You need to first split the bunch of users into single user values using the regular expression action.



Afterwards you can loop through them with the for each action to get the single user values.



For each user you need to fill an additional variable with the display name and either use the name right away or concatenate all of them. I build an example to make it more visible.





 



If you have questions about the action details let me know 😉



Or you can follow the more easy way described here https://community.nintex.com/t5/Nintex-for-SharePoint-Forum/How-to-capture-the-display-name-of-multiple-people-from-a-people/m-p/11709#M9813


Reply