Skip to main content
Nintex Community Menu Bar

Hello

 

I am trying to get Display Names from another site list's multi-person column. 

 

I have Nintex Workflow where I use Query List with CAML query to get a list of supervisors and managers for a department. 

 

<Query><Lists><List ID="{23BC57C8-2E5C-462E-BFCE-EDFE10046D36}" /></Lists><ViewFields><FieldRef Name="Manager_x0020_Person" /><FieldRef Name="Supervisor_x0020_Person" /></ViewFields><Where><Eq><FieldRef Name="Department" /><Value Type="String">{ItemProperty:Department1}</Value></Eq></Where></Query>

 

I store the results in two separate variables, var_Supervisors and var_Managers (I tried a single line of text, multi and collection).

 

As expected the results are saved in format i:0#.w|<domain><username>;i:0#.w|<domain><username>.

I want to use the results in e-mail notification but instead of userIDs, I would like to have Display Names. 

 

I tried to use For Each action on the collection variable and Set Variable where I change the data type to Display Name, Semicolon delimited but with every possible variable type (SLOT, MLOT, Collection, POG) the workflow crashes with the error "Coercion Failed: Unable to transform the input lookup data into the requested type."

 

Any ideas on how this can be fixed?

 

Note: I did have Run if action to only run if the variable is not empty.

I managed to get the results I wanted but the workflow is not pretty so if any of you know how it could be simplified, please share your ideas.



 



1. Query List to get approving managers and supervisors.





 



2. Regular Expression to split COL_Supervisors items .





 



3. For each to loop through all items in the COL_Supervisors collection variable and store them in people or group variable POG_Supervisors.





 



4. Run if the POG_Supervisors variable is not empty.





 



5. Set variable to store display names in a single line of text variable SLOT_Supervisors (not semicolon delimited).





 



6. Build String to concatenate the display names.





 



7. Regular Expression to get rid of the last comma from DisplayNames_Supervisors variable.





 



Now I repeat the above to get the names for managers. 



 



The workflow:





 


Reply