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 / Reset a screen with a ...
Power Apps
Answered

Reset a screen with a form and a gallery

(0) ShareShare
ReportReport
Posted on by 202

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 Excel

Many thanks

Categories:
I have the same question (0)
  • timl Profile Picture
    36,393 Super User 2025 Season 2 on at

    @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)
  • SebS Profile Picture
    4,616 Moderator on at

    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

  • russelln1 Profile Picture
    202 on at

    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.

     

  • russelln1 Profile Picture
    202 on at

    Hi @timl 

    This is what I have in the Gallery Items Control:

    Search(Table1,SearchBox.Text,"ReportingName", "ReportID", "Status")

     

  • Verified answer
    SebS Profile Picture
    4,616 Moderator on at

    Hello,

     

    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.

     

    Regards

  • dhavalkankoshiy Profile Picture
    39 on at

    Hello,

     

    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)

    dhavalkankoshiy_0-1656591151148.png

    dhavalkankoshiy_1-1656591205985.png

     

    On Edit form submit button you can clear variable record and Gallery1 (e.g.  onSelect of submit button set(varRecord, Blank);Reset(Gallery1)

     

    Regards,

  • timl Profile Picture
    36,393 Super User 2025 Season 2 on at

    @russelln1 

    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()).

     

    timl_0-1656591682980.png

    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.

  • dhavalkankoshiy Profile Picture
    39 on at

    You can write Reset(Gallery1) below Reset(SearchBox) so Gallery1 reset with new details.

     

  • russelln1 Profile Picture
    202 on at

    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.

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard