cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ifti
Advocate II
Advocate II

Have the option to retrieve first and last name of a user via User()

Can we have the ability to select a user's first and last name instead of gettng full name?

 

I need this for the form that I use in SharePoint which can get the data and fill it automatically but not via the app.

 

The app can only get the logged in user's full user name via User().FullName. Options like "First name", "Last name" etc. would be awesome to have. 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
sarafankit
Power Apps
Power Apps

I think you can achieve this using the Office 365 Users connection.

 

Office365Users.MyProfile().GivenName

Office365Users.MyProfile().Surname

View solution in original post

4 REPLIES 4
sarafankit
Power Apps
Power Apps

I think you can achieve this using the Office 365 Users connection.

 

Office365Users.MyProfile().GivenName

Office365Users.MyProfile().Surname

View solution in original post

You're a champ and you know it!

 

Thanks heaps 🙂

nanma
Frequent Visitor

Hi , I had a doubt regarding this. If i need to auto -pre populate users  firstname and lastname once the user login to the page ; for example :

 If(Form1.Mode = FormMode.New, Office365Users.UserProfile(User().Email).DisplayName,Parent.Default)

how can i give lastname as well to this ???????????

 

nanma
Frequent Visitor

Hi , I had a doubt regarding this. If i need to auto -pre populate users  firstname and lastname once the user login to the page ; for example :

 If(Form1.Mode = FormMode.New, Office365Users.UserProfile(User().Email).DisplayName,Parent.Default)

how can i give lastname as well to this ???????????

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

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 (92,287)