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

Notifications

Announcements

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,433 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard