Solved

NWC Converts People Picker to Delimited Text

  • 10 March 2022
  • 2 replies
  • 72 views

Badge +6

I have a list with a people picker column, and when I query the list from NWC, it brings in the ID and email address as two separate text fields that are semicolon delimited.

 

Like this:
"R@jacksongov.org;H@jacksongov.org;C@jacksongov.org;J@jacksongov.org"

 

I redacted names when I pasted it in, full emails are saved in NWC, and the quotation marks aren't there, I added them so this post wouldn't autoconvert to links.

 

So, how do I convert this to a collection? Can I use a regex to replace the semicolons with commas and add brackets? Then what? Add items to collection, but how do I parse it?

 

After that, it gets easy, I query Azure to get the user display names... Which is what the O365 version gave me - way easier!

 

This is a component workflow from an O365 workflow due to nobody has answered my question about displaying repeating sections in a state machine task in NWC. So, is there a way to pass the display names from O365 to the NWC component as a collection?

icon

Best answer by leighburke 10 March 2022, 23:28

View original

2 replies

Userlevel 5
Badge +13

@AnneC You can use the split function in a regular expression to convert your emails to a collection. That should get you what you need for the AD query.


 



 

Badge +6

So, to use names from the people picker in a docgen document:


 


O365


Grab the people picker control to use on the doc gen and it shows display names.


 


NWC 


get the email text field


use regex to split the email addresses in the text string


loop for each


use AD lookup to get the display name for each email address


add each name to a new collection


use the collection as repeating data in docgen


 


It's a tad more difficult.


 

Reply