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 / Get user ID of the cur...
Power Apps
Suggested Answer

Get user ID of the current logged in account, add it to other sharepoint list

(0) ShareShare
ReportReport
Posted on by 8
Hello Folks,
 
I'm trying to get the user ID based from the current logged in user, that will be from tbl_employee.
 
I have another list which is named tbl_eval_content, of the column here is related with the tbl_employee, emp_ID column.
 
Now, I want to get the user ID from tbl_employee and fetch that ID then add it to tbl_eval_contents. 

Below is my code:
 
Set(CurrentUserEmail, Office365Users.MyProfile().Mail);
Set(CurrentUserID, LookUp(tbl_employee, User_email = CurrentUserEmail, ID));
 
Patch(
    tbl_eval_content,
    Defaults(tbl_eval_content),
    {
        emp_id: CurrentUserID,
        Punctual: Value(dr1.Selected.Value),
        // Convert text to number
        Biometrics: Value(dr2.Selected.Value),
        // Convert text to number
        LeaveForm: Value(dr3.Selected.Value),
        // Convert text to number
        OTForms: Value(dr4.Selected.Value),
        // Convert text to number
        STER: Value(dr5.Selected.Value),
        // Convert text to number
        TakeBreak: Value(dr6.Selected.Value),
        // Convert text to number
        ProperUniform: Value(dr7.Selected.Value),
        // Convert text to number
        WearingID: Value(dr8.Selected.Value),
        // Convert text to number
        Grooming: Value(dr9.Selected.Value),
        // Convert text to number
        Station: Value(dr10.Selected.Value)
// Convert text to number
    }
)
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi,
     
    I do not see a question here at all.
     
    What are you asking for. Your code looks fine. Although I would use User().Email Instead of looking up their profile and grabbing that one.
     
    If you are saying this doesnt work, it could be because the UPN is actually NOT the email you are logging in with, in which case on the users profile page in Outlook, you would see 2 different emails.
     
    Anyway.. please ask a question.
  • Suggested answer
    rpatricio Profile Picture
    8 on at
    Hello FLMike,
     
    Thank you for replying to my post.
     
    Once I hit the submit button, it doesn't get or return the ID of the employee.
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard