web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Still having trouble d...
Power Apps
Answered

Still having trouble displaying Office365UserPhoto

(0) ShareShare
ReportReport
Posted on by 380

@TheRobRush 

Hi Rob sorry to open this one up again: Solved: Re: Having trouble displaying the correct Office36... - Power Platform Community (microsoft.com) but my datasource has been refreshed and I now have to cater for records like this:

WARREN ANDREWS ; Louis Gettings ; * * ; * * ; * *

the code I have currently caters for a double space or a semi-colon between names - I now need to add the 2 asterisks separated by a space

here's my code:

If(
!IsBlank(ThisItem.Title),
Office365Users.UserPhoto(
LookUp(
MyDetails,
Switch(
CountRows(
Filter(
Split(
Title1.Text,
""
),
Result = ";"
)
),
0,
First(
Split(
Title1.Text,
" "
)
).Result,

First(
Split(
Title1.Text,
" ; "
)
).Result
) in Lower(firstname & " " & surname),
email
)
)
)

I have tried adding another Split but it doesn't like my syntax - any assistance would be greatly appreciated

Categories:
  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    are the * * always separated from previous name in the string by a ; semicolon as in your example "WARREN ANDREWS ; Louis Gettings ; * * ; * * ; * *"? Because the original split would still work just fine to pull the first name in that string shown, plugged it into our original formula that determines first name just to be sure

    Switch(
     CountRows(Filter(Split(Label7.Text,""),Result=";")),
     0, First(Split(Label7.Text, " ")).Result,
     First(Split(Label7.Text, "; ")).Result)

     

    with the string referenced above, the result is still

    TheRobRush_0-1669654030283.png

     

    Warren Andrews as expected.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard