Announcements
Hi I have a screen with a Form and a Gallery - The gallery allows you to search the data and select the record you want and the Form will display the record that you've selected and allow you to edit and add certain bits and pieces in to it.When I submit the edited Form I want the gallery and the form to reset ready for another search (it's not imperative but just makes it more professional looking and cleaner)Datasource is ExcelMany thanks
@russelln1
Assuming that the Items property of the gallery is set to formula that references a search text input control, you can call the Reset function to reset the text input control.
In the OnSuccess property of your edit form, you would add the following line:
Reset(txtSearchTextBox)
Hello,
If you used a form in PowerApps you can submit your form using SubmitForm(Form1) and to reset it ResetForm(Form1). If you want to submit and reset just add to a button OnSelect SubmitForm(Form1);ResetForm(Form1) to the button
Gallery should pick up any changes automatically from data source so I don't know what You mean by reset it.
Hope it helps
Regards
This only resets the form - when I say reset the gallery I mean it takes out the last search criteria that I entered in to it.
Hi @timl This is what I have in the Gallery Items Control:
Search(Table1,SearchBox.Text,"ReportingName", "ReportID", "Status")
So Gallery is controlled by InputText field called SearchBox so to submit button add SubmitForm(Form1);ResetForm(Form1);Reset(SearchBox) that should restart Your control for gallery.
You create new variable and pass current item to that created variable on (e.g. Gallery1 OnSelect(varRecord, ThisItem)).
On form item replace Gallery selected item to variable item (e.g. form1 item Gallery1.Selected to varRecord)
On Edit form submit button you can clear variable record and Gallery1 (e.g. onSelect of submit button set(varRecord, Blank);Reset(Gallery1))
Regards,
The edit form will have a property called OnSuccess. This is the formula that runs when the form is submitted sucessfully. By default, there may be some formula already there (for example, Back()).
In the case that's something already there, you could append the call to Reset at the start of the formula.
Reset(SearchBox); Back()
Reset(SearchBox) will clear the contents the search textbox and that should reset the gallery so that displays all records.
You can write Reset(Gallery1) below Reset(SearchBox) so Gallery1 reset with new details.
That works exactly how I wanted it to - I also added 'ResetForm(Form2);Reset(SearchBox)' to the main menu button and it works how I want it to there also.Appreciate it
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 505
WarrenBelz 502 Most Valuable Professional
Haque 324