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
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!
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.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2