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 / PowerApps Patch functi...
Power Apps
Answered

PowerApps Patch function to log app use

(0) ShareShare
ReportReport
Posted on by 26
I'm relatively new to power apps. I've created an app that is connected to a SharePoint list. This app contains a search input (in which someone can search a name). This is linked to a gallery, displaying rows from the list assosciated with that name. When a row from the gallery is selected, this displays information from that row in the sharepoint list in a from viewer. 
 
I want to be able to track information on who is using the app and what is being selected from the gallery. I believe I can do this with a patch function, recording information of the user (email would be fine) and the names they are selecting in a separate list. Is this the best way to do this? If so, what would the patch function look like and where should I place this to trigger when someone selects an item from the gallery? 

Thanks! 
Categories:
I have the same question (0)
  • Verified answer
    Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @karenperry,
     
    Yes, creating a separate SharePoint list for logging/auditing of the item. 
     
    You can create a separate SharePoint list something like "AppLogs" and store details like:
    User Email
    Selected Record Name
    Selected Record ID

    You can place the code on the Gallery item OnSelect

    Patch(
        AppLogs, //Assuming your SharePoint list name is "AppLogs" if it's different please replace
        Defaults(AppLogs),
        {
            UserEmail: User().Email,
            SelectedName: ThisItem.Title,
            SelectedRecordID:ThisItem.ID
        }
    )
    
    //If your column name is different then please replace with you column name..
    This will create a new log entry every time a user selects an item from the gallery.
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------

    📩 Need more help? Just mention @Kalathiya and I’ll be happy to assist.

    ✔️ If this answer helped you, please tick “Does this answer your question?” so it can be marked as the Verified Answer.

    💛 A Like always motivates me to keep contributing!

     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard