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 / How to patch a user in...
Power Apps
Answered

How to patch a user into a LookUp column in a UserLog in SharePoint List

(0) ShareShare
ReportReport
Posted on by 932

Unless it is a horrible idea, I would like to patch my users presence in a UserLog. I could grab their email, ID or whatever, but it might be better to put their identifying information into a LookUp column.

 

How is this done?

 

This has not worked:

 

 

Patch(DDLUserLog, 
 Defaults(DDLUserLog),
 {
 UserLookUp: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
 ID:Office365Users.MyProfileV2().id
 }
 }
);

 

 

Thank you.

Categories:
  • WarrenBelz Profile Picture
    156,763 Most Valuable Professional on at

    Hi @BenDonahue ,

    I do something similar tracking logins

    Patch(
     DDLUserLog, 
     Defaults(DDLUserLog),
     {
     UserMail: User().Email, 
     LoginTime:Now(),
     AppUsed:"WhateverApp"
     }
    )

     

    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.

    Visit my blog Practical Power Apps

  • BenDonahue Profile Picture
    932 on at

    If I am interpreting correctly, you are using one list to track logins for all apps. I like it. I was going to create app-specific lists, but I like your approach better. 

     

    If you would, do you know of a way to store an Office365Users user into a SharePoint field? I assume that would be a LookUp column. Also, I am assuming this is possible; it may not be. Instead of storing a user's email or ObjectID, storing their profile may open avenues for me previously closed, but it might bog down the whole process, for all I know.

     

    Thank you, Warren, as always 🙂

  • Verified answer
    WarrenBelz Profile Picture
    156,763 Most Valuable Professional on at

    Hi @BenDonahue ,

    Unless you really need those field types (People and Lookup), it is much simpler to simply store the data you want as Text (and saves a lot of grief later when you want to Filter/Sort/Lookup/GroupBy/Patch on them in Power Apps).

    You can however use the Office365User connector in Power Apps to get this information. Bear in mind that User().FullName and User().Email are available directly in Power Apps.

     

    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.

    Visit my blog Practical Power Apps

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard