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 / How to stop form reset...
Power Apps
Answered

How to stop form reset on submit and navigation

(0) ShareShare
ReportReport
Posted on by 25

Hi there, 

 

I want to prevent a form resetting on submission and navigation to the next page. I have a two screen app and the issue occurs both when navigating 'back' from Screen 2 to Screen 1 and with the population of an HTML text box on Screen 2 based on answers from Screen 1.

 

  • Screen 1 contains a form ["Form1"] linked to a Sharepoint List ["SPList1"] and a dynamically generated gallery with radio buttons ["GalleryRadio"] linked to a separate Sharepoint list ["SPList2"]. 
  • Screen 2  contains another dynamically generated gallery  with free text fields ["GalleryFreeText"] and is also linked to  Sharepoint List "SPList2" and an HTML text box ("HTMLText1") that recalls the user input responses from "Form1" and "GalleryRadio", however, I am finding that "Form1" is resetting itself and therefore this box appears blank.

 

On Screen 1, there is a "Next" button that has the following property "OnSelect":

 

//Patch and Save GalleryRadio Question Responses
Clear(colResponseValues);
ForAll('GalleryRadio'.AllItems, Collect(colResponseValues, {Title: ThisRecord.Title, ParentID: ThisRecord.ParentID , QuestionName: ThisRecord.QuestionName, RadioResponse: Radio2_1.Selected.Value}));
Patch('SPList2', colResponseValues);

//Submit form
SubmitForm(Form1) 

 

Navigation is triggered in the "OnSuccess" property of the form:

              Navigate('Screen 2')

 

The "OnReset" property for Form1 is set as false. 

 

Any assistance or ideas will be greatly appreciated!

Categories:
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @hbbfzs 

    You can use the property Form.LastSubmit property to set a global variable for that record.  It would be in the OnSuccess property of the form.  Something like  Set(varrecord,Form1.LastSubmit); Navigate("Screen 2")

  • hbbfzs Profile Picture
    25 on at

    Thanks @Drrickryp . For some reason this is now showing a previous record submitted, not the current record. Should I be changing the 'Item' property of the form to 'varRecord' too?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @hbbfzs 

    You could, but if you are navigating to the form from a gallery, you would have to add Set(varRecord, ThisItem);Navigate(scryoureditscreen) to an icon inside the gallery that selects the record being edited in the form.

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

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard