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 / Patch function in Powe...
Power Apps
Answered

Patch function in Powerapps

(0) ShareShare
ReportReport
Posted on by 2

Hello Powerapps Community,
How do I setup patch function in powerapps? I would like to trigger patch function to get the email, username and time in an excel sheet? 

Categories:
I have the same question (0)
  • VJR Profile Picture
    7,635 on at

    Hello @IshanVats 

     

    Does this official video and the documentation help?

    https://docs.microsoft.com/en-us/power-platform/power-fx/reference/function-patch

     

  • Verified answer
    rohitsbots Profile Picture
    280 on at

    So on create a button and name it For ex. Send

    OnSelect event you can capture the email address using User().Email and save it in a sharepoint list or you can store that in a excel.

     

    You need to connect your app to an excel sheet and everytime someone clicks on send button you need to save that excel sheet with User().Email.

     

    1. Create an excel in onedrive with these columns User Name, Email, Time

    Ignore the last column PowerappsId that powerapps will automatically create once you connect the excel through onedrive to the app
     
    rohitsbots_0-1660137949490.png

    2. Once you create the columns in excel you also need to Select your columns and one row and then create that as a table in excel. Give a name to your table. Table2 - Name of the table in excel

    3. Now connect to this excel through OneDrive connector in PowerApps and choose the table you created.

    4. On your send button you need to write this code Patch( Table2, Defaults(Table2), { 'User Name': User().FullName, Email: User().Email, Time: Now() } )

     

    rohitsbots_1-1660138099128.png

     

    Every time user clicks on send button it should log an entry with user details and time as well

     

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
Vish WR Profile Picture

Vish WR 955

#2
11manish Profile Picture

11manish 652

#3
Valantis Profile Picture

Valantis 626

Last 30 days Overall leaderboard