lee_hoselton
Forms Fledgling

Get display names from a Person and Group column in a custom workflow task

Jump to solution

I am trying to build out workflow logic that assignes a to-do task.  On that task, I have a person and group column that the task owner will specify employees that are bidding on open internal positions.  I then plan to input these names into an email notification action that willl be sent out to our HR team.

 

I've been able to pull the values from this person and group column by using a Query List action.  However this is pulling their account name rather than there display name.  I can't seem to find an option to format the data as display name in this scenario like I can with person/group columns on the form the workflow is running on.

 

Does anyone know of a method to obtain Display names from a person and group column on a workflow task?

0 Kudos
Reply
6 Replies
brianknight
Design Canvas Artiste

Re: Get display names from a Person and Group column in a custom workflow task

Jump to solution

Not sure about Groups, but I'm sure it can be done.  Here is how I do it for an individual person.  Create a workflow variable and make it a single line of text.   Set the value of the variable with this setting:

Capture.JPG

In your circumstance, your source will most likely be your variable you used for query item.  My source is the list item.  Hope this helps.  

0 Kudos
Reply
kunalpatel
Automation Master
Automation Master

Re: Get display names from a Person and Group column in a custom workflow task

Jump to solution

@lee_hoselton ....Follow below steps:

 

  • Query your list and get the collection of your users in collec variable
  • Using For each, store each user in SLT variable
  • Inside that for loop, use Set Variable action and configure as shown in below screenshot

SC05.jpg

  • When you click the 3 dots (2nd circle) you get the different options
  • If you want to re-create the collections with Display Name then you can use the Build String to create the collection and store it in a different SLT variable and use it

View solution in original post

0 Kudos
Reply
Rudixx
Forms Fledgling

Re: Get display names from a Person and Group column in a custom workflow task

Jump to solution

Hello @kunalpatel 

 

I did the above but the workflow keeps failing.

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

 

Rudixx_0-1629978809265.png

 

0 Kudos
Reply
kunalpatel
Automation Master
Automation Master

Re: Get display names from a Person and Group column in a custom workflow task

Jump to solution

@Rudixx can you share the configuration screenshot too? Also, is this one value or multiple values?

0 Kudos
Reply
Rudixx
Forms Fledgling

Re: Get display names from a Person and Group column in a custom workflow task

Jump to solution

@kunalpatel 

 

Sure, this is the configuration from my last try, which errors too.

There can be 0 values or more than 1.

 

On a parent site, I have a list of departments with columns, Manager (multi person or group column) and Supervisors (multi person or group column).

 

On a child site I am looking up the above values.

This is my workflow:

 

1. Query List and save managers and supervisors in two separate collection variables.

Rudixx_0-1630572156968.png

 

2. For Each action, I am storing the values from COL_Supervisors in POG_Supervisors which is people or group variable. I've tried other types too with no luck.

 

Rudixx_1-1630572287578.png

 

3. Run if action to run only if the POG_Supervisors variable is not empty.

Rudixx_2-1630572348109.png

 

4. Regular Expression to remove domain prefix from the logins, pattern: i:0#.w\|[a-z]{3}-dc\\

 

Rudixx_0-1630572759398.png

 

5. Set variable, saving POG_Supervisors - Display Names, Semicolon Delimited in single line of text variable SLOT_Supervisors

Rudixx_3-1630572426137.png

 

6. Error

Rudixx_4-1630572548493.png

 

 

 

0 Kudos
Reply
Rudixx
Forms Fledgling

Re: Get display names from a Person and Group column in a custom workflow task

Jump to solution

@kunalpatel 

I managed the get the names and I described my steps in this thread: https://community.nintex.com/t5/Nintex-for-SharePoint-Forum/Get-Display-Names-from-another-site-list...

 

Please feel free to take a look and let me know if it could be simplified. 

0 Kudos
Reply