web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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
    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,362 Super User 2025 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard