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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Auto populate fields b...
Power Apps
Unanswered

Auto populate fields based on logged in user

(0) ShareShare
ReportReport
Posted on by 519

Hello,

I have two dropdown fields in my app - Division and Department.  I would like this to be auto-populated with the current logged in user.  Because our AD info. is not accurate, I created an employee listing in SharePoint with Employee name, Division, Department, Email address.  What I would like is based on the current logged in user email address, the Division and Department from SharePoint auto populates.  I am also not sure if for this to work if it can be accomplished using the dropdowns or if they would have to be converted to text boxes.  Any guidance on how to achieve the above appreciated.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @joshieboy 

    You can set a global variable in your OnStart (or other place) to get the record from your list, then you can reference it throughout your app.

    ex.   Set(glbUserInfo, LookUp(yourList, EmailAddress=User().Email))

     

    Then for your dropdown controls, you can set the Default property to glbUserInfo.Department  and glbUserInfo.Division as needed.

     

    I hope this is helpful for you.

     

  • joshieboy Profile Picture
    519 on at

    Hi @RandyHayes 

    Do I also need to include a field in the app and set it to my user email, so that on app start, it can query that field against the SharePoint list?  I'm trying your above solution but feel as if I'm missing a step.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard