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

Community site session details

Session Id : DF/Eb5MjmjCA1Gl/oZkiBB
Power Apps - Building Power Apps
Answered

User.() to save current user to ID in excel pane. Help for new learner

Like (0) ShareShare
ReportReport
Posted on 28 Jul 2020 07:57:24 by

Hi, im fairly new to programming, and only known Power Apps for less than a week.

im working on an app. where driving consultants can register their drive length in kilometers total and time.

i have used the "build app from data. so its very basic, and it have the basics covered.

right now i have a field for them to enter their name/initials, but i would like it to automaticly use the currently logged in user, i have the code " User().FullName " which i use to display currently logged in at the bottom of the app, i would like this feature for automatically fill in at the field i mentioned, either by User().FullName or User().Email

Then if it was "Per@contoso.com" it would put in the data on the "Per" sheet/Pane

Hope this makes sense. If you can help i would be very grateful for any of these full code/hints to the correct documentation (i find the documentation very lacking to my skills)/ guides that might help me in my path.

ive attached 3 screenshots of the app to help explain what i mean.

Regards Henrik Nielsen

 

Categories:
  • Community Power Platform Member Profile Picture
    on 29 Jul 2020 at 07:58:22
    Re: User.() to save current user to ID in excel pane. Help for new learner

    Hi thank you alot, i used the first solution you suggested, since i couldn't get the 2nd code to work ( i didnt understand it properly) But since the name in email was lowercase, i ended up changing it to

    Left(
    User().FullName,
    Find(" ",User().FullName)-1
    )

    i was kinda puzzled with the "Find("@"**** first. but then a friend said it was to tell a point from where to sort from and then ofc the -1 was for removing it.

    So thank you very much!

  • Verified answer
    WarrenBelz Profile Picture
    148,894 Most Valuable Professional on 28 Jul 2020 at 08:02:12
    Re: User.() to save current user to ID in excel pane. Help for new learner

    Hi @Anonymous ,

    The code

    Left(
     User().Email,
     Find("@",User().Email)-1
    )

    should do the job for you on the email and User().FullName will get their name.
    You can use either of these as the Default of the text box in New Mode so put this

    If(
     YOurFormName.Mode=FormMode.New,
     Left(
     User().Email,
     Find(
     "@",
     User().Email
     )-1
     ),
     Parent.Default
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete