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:
I have the same question (0)
  • 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,974 Moderator 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

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
11manish Profile Picture

11manish 600

#2
WarrenBelz Profile Picture

WarrenBelz 478 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard