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 / Submit a form with patch
Power Apps
Unanswered

Submit a form with patch

(0) ShareShare
ReportReport
Posted on by 75

hai guys, i just want to ask how do i submit a form and at the same time, i want to patch submission date with Now() function.

Cause as i know that patch will update the data, but not sure about when submitting a form

 

my code:


If(
Form1.Valid,


// Submit the form, clear attachments, reset the form, and open a new form
Set(varSuccessPopup, true);
SubmitForm(Form1);
Clear(colFilteredAttachments);
ResetForm(Form1);
NewForm(Form1);

,
Set(varInvalidSubmit,true);

);

where can i insert patch function here?


Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @nayem,

    Do you want to update the last submit record?

     

    If so, you could add Patch() just behind the SubmitForm():

    If(
    Form1.Valid,
    
    
    // Submit the form, clear attachments, reset the form, and open a new form
    Set(varSuccessPopup, true);
    SubmitForm(Form1);
    Patch(list,Form1.LastSubmit,{Date:Now()});//Here add the Patch()
    Clear(colFilteredAttachments);
    ResetForm(Form1);
    NewForm(Form1);
    
    ,
    Set(varInvalidSubmit,true);
    
    );
  • Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at

    Hi,

     

    Since you are NOT running things concurrently, you can place your Patch, right under your SubmitForm(Form1) expression.

    Set(varSuccessPopup, true);
    SubmitForm(Form1);
    
    Patch(goes here)
    
    Clear(colFilteredAttachments);
    ResetForm(Form1);
    NewForm(Form1);

     

    Depending on what data you need, if you want data from the Form after submission, you can use Form1.LastSubmit 


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard