Solved

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

  • 12 September 2019
  • 6 replies
  • 1199 views

Badge +3

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?

icon

Best answer by kunalpatel 25 September 2019, 22:19

View original

6 replies

Userlevel 2
Badge +9

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:



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.  

Badge +12

@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




  • 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

Badge +4

Hello @kunalpatel 


 


I did the above but the workflow keeps failing.


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


 



 

Badge +12

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

Badge +4

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



 


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.


 



 


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



 


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


 



 


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



 


6. Error



 


 


 

Badge +4

@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-s-multi-person-column/m-p/209427/highlight/true#M79227


 


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

Reply