Skip to main content

Hi,

 

I have a people picker field on my form that needs to grab multiple people.   I want the ability to pull real names from this information for an email report that is generated in my workflow and it works great using a calculated column and the following formula

 

userProfileLookup(Meetingattendees, "FirstName")+" "+userProfileLookup(Meetingattendees, "LastName")

 

 

the issue I run into is what if I have 2+ names in my field?   This causes my calc column to return the #Value! instead of real names.   Any ideas?

The way to do this :

1- Create a Text variable

2 - Set this variable with your multi-users people field --> use "Login splitted by comma" or something like this (don't know the real syntax in english version)

You will get something like "User1;User2;User 3" in your variable.

3 - Use regular expression to split on ";" char and save the result in a collection

4- You can now do a "for each" loop on your collection to create your email body


I was able to add several by just using the + between them but the issue I have now run into is the people picker is incredibly slow while the calc field resolves the names.   Is there a better way to do this?   My people picker may have up to 25 people in the list and I need a way to resolve their userID to real name.   I would prefer to use a workflow for this but I don't have the LDAP function available to me.

My ugly calc formula

userProfileLookup(Meetingattendeese0], "FirstName")+" "+userProfileLookup(Meetingattendeese0], "LastName")+" "+userProfileLookup(Meetingattendeese1], "FirstName")+" "+userProfileLookup(Meetingattendeese1], "LastName")+" "+userProfileLookup(Meetingattendeese2], "FirstName")+" "+userProfileLookup(Meetingattendeese2], "LastName")+" "+userProfileLookup(Meetingattendeese3], "FirstName")+" "+userProfileLookup(Meetingattendeese3], "LastName")+" "+userProfileLookup(Meetingattendeese4], "FirstName")+" "+userProfileLookup(Meetingattendeese4], "LastName")+" "+userProfileLookup(Meetingattendeese5], "FirstName")+" "+userProfileLookup(Meetingattendeese5], "LastName")+" "+userProfileLookup(Meetingattendeese6], "FirstName")+" "+userProfileLookup(Meetingattendeese6], "LastName")+" "+userProfileLookup(Meetingattendeese7], "FirstName")+" "+userProfileLookup(Meetingattendeese7], "LastName")+" "+userProfileLookup(Meetingattendeese8], "FirstName")+" "+userProfileLookup(Meetingattendeese8], "LastName")+" "+userProfileLookup(Meetingattendeese9], "FirstName")+" "+userProfileLookup(Meetingattendeese9], "LastName")+" "+userProfileLookup(Meetingattendeese10], "FirstName")+" "+userProfileLookup(Meetingattendeese10], "LastName")+" "+userProfileLookup(Meetingattendeese11], "FirstName")+" "+userProfileLookup(Meetingattendeese11], "LastName")+" "+userProfileLookup(Meetingattendeese12], "FirstName")+" "+userProfileLookup(Meetingattendeese12], "LastName")+" "+userProfileLookup(Meetingattendeese13], "FirstName")+" "+userProfileLookup(Meetingattendeese13], "LastName")+" "+userProfileLookup(Meetingattendeese14], "FirstName")+" "+userProfileLookup(Meetingattendeese14], "LastName")


Reply