cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sifu
Responsive Resident
Responsive Resident

Feed combobox/peopl with UPNs/email to display names

Hello,

i have a column in a sharepoint list where are upns separated by semicolon and space...  (abd@company.com; bcd@company.com, etc...).

I want to feed this column to a combobox but cant figure out how to split this... something like:

 

Office365Users.UserProfileV2( Split(ThisItem.IdeaAuthors,";").Result ).displayName

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Sifu ,

 

Could you tell me:

Do you have a record similar to the picture below?

v-xiaochen-msft_0-1618467493598.png

// 'Test' is a 'Single line of text' column.

 

Do you want to fill the combo box control with these three emails?

If so, you could use this formula on Items property of combo box control:

ForAll(Split(First(LIST112).Test,";"),TrimEnds(Result))

 

If you want to get all UserProfiles and fill the combo box control, you could tyr this formula on Items property of combo box control:

ForAll(ForAll(Split(First(LIST112).Test,";"),TrimEnds(Result)),Office365Users.UserProfileV2(Value))

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

5 REPLIES 5
v-xiaochen-msft
Community Support
Community Support

Hi @Sifu ,

 

Could you tell me:

Do you have a record similar to the picture below?

v-xiaochen-msft_0-1618467493598.png

// 'Test' is a 'Single line of text' column.

 

Do you want to fill the combo box control with these three emails?

If so, you could use this formula on Items property of combo box control:

ForAll(Split(First(LIST112).Test,";"),TrimEnds(Result))

 

If you want to get all UserProfiles and fill the combo box control, you could tyr this formula on Items property of combo box control:

ForAll(ForAll(Split(First(LIST112).Test,";"),TrimEnds(Result)),Office365Users.UserProfileV2(Value))

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

Sifu
Responsive Resident
Responsive Resident

almost working, i had to adapt it to reflect the current item:

ForAll(ForAll(Split(ThisItem.IdeaAuthors,";"),TrimEnds(Result)),Office365Users.UserProfileV2(Value).displayName)

but i also get an error, any idea why?

Sifu_0-1618486343131.png

oddly it works (with an error..)

 

Sifu
Responsive Resident
Responsive Resident

the source column had an ";" after last name... this was the problem

v-xiaochen-msft
Community Support
Community Support

Hi @Sifu ,

 

You could use filter() function to solve it.

Please try this formua:

ForAll(Filter(ForAll(Split(First(LIST112).Test,";"),TrimEnds(Result)),!IsBlank(Value)),Office365Users.UserProfileV2(Value))

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

Sifu
Responsive Resident
Responsive Resident

thanks but i already resolved it at the source... so it wont pout the ";" after last user upn

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (46,451)