cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Madhusri
Frequent Visitor

Display Name being saved differently

Hi,

 

We have an app where we are trying to capture the full name of the person who is filling out the form.

The code we have is Office365User.UserProfile(User().Email).DisplayName which is working great.

 

However for very few users who have nick names for their first name, this code is displaying sometime as Tom and other times as Thomas, sometimes as Cath other times as Catherine etc. In another screen we have filters based on this field and the business is complaining about having duplicate names.

 

Any idea why this could be happening? Any leads on how to debug this is much appreciated.

 

Thank you

5 REPLIES 5
kylzbaba
Resolver I
Resolver I

A good way to avoid this is to use the people picker or instead collect emails then on the second screen filter based on emails but on the front end, display the usernames associated with those emails.

That totally makes sense. 

However we are using User().Email to get the display name. Shouldn't that give us a unique display name? In what scenarios would it give different names? Is it different browser type or a different device? I am not sure.

Hi, @Madhusri  you are said "capture the full name of the person who is filling out the form"

So, who is filling the form, he is used your app. So, simply you can use below coding

Office365Users.MyProfile().DisplayName

It's return who is log in PowerApps, you will get that person display name

More reference regarding Office365 see below link,
Connect to Office 365 Users connection from Power Apps - Power Apps | Microsoft Docs

Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Not really, it's an AD issue really. I've had same experiences where AD will disay different display names. That's why for situations like this I revert to either collecting the users using people picker we just get the emails that would always be unique.

@kylzbaba  if you need email id means use below formulae

Office365Users.MyProfile().Mail

More info refer Connect to Office 365 Users connection from Power Apps - Power Apps | Microsoft Docs

Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,655)