hamo
Nintex Observer

Capture the Display Names of a Nintex People Variable

Jump to solution

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

 

Annotation 2021-04-21 153334.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 …

Annotation 2021-04-21 154001.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?

0 Kudos
Reply
1 Reply
Lorenz
Nintex Observer

Re: Capture the Display Names of a Nintex People Variable

Jump to solution

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.

Lorenz_0-1619169071620.png

 

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-multi...

View solution in original post

0 Kudos
Reply