Announcements
Hi
I am trying to get a users display name and department.
It works fine with ...
galRequests.Selected.MatterPartner.DisplayName & " (" & Office365Users.UserProfile(galRequests.Selected.MatterPartner.Email).Department & ")"
However if the MatterPartner DisplayName or Email has a single quote
John.O'Byrne@contoso.com
it gives an error.
Thanks
P
Hi @pmwhelan ,
Yes - I now have OSullivan and ONeill in AD - you will have many more issues with this in things like embedded links and URL parameters - I have simply given up . . .
Trying
galRequests.Selected.MatterPartner.DisplayName & " (" & Office365Users.UserProfile(Replace(galRequests.Selected.MatterPartner.Email, "'", "")).Department & ")"
says
"Error in this formula"
Well that sucks!
Thanks for the input.
I tried a workaround and opened a new question
https://powerusers.microsoft.com/t5/Building-Power-Apps/JSON-parsing-error-expected-object-but-got-array/m-p/2143681#M536347
@pmwhelan ,
If you manage to solve it, post back here . . .
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 248 Super User 2026 Season 2
WarrenBelz 192 Most Valuable Professional
Mohsin Ali 135