cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Big_Blue_Bear
Helper I
Helper I

Form wont clear/reset

Hi, I have an developed an app, and there is a gallery of items to choose from that feeds a form. All fed from SharePoint Lists. I can select individual gallery items or search across the gallery....all works with no issues

 

On selecting a gallery item then it navigates to full details of the item selected in a new screen. All works as designed.

 

When I use the search functionality to locate & select a gallery item the selected item, flashes on the new screen then defaults to the previous selected item. Despite having a ResetForm statement when I submit the form.

 

I've tried resetform on selection of submit button, ive tried reset form onsuccess......but neither seem to be effective or they are being over ridden to the original form content.

 

Any assistance would be gratefully received.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Big_Blue_Bear 

These formulas should be changed as follows:

- the OnSelect action formula for your Gallery:

Set(glbRecord, ThisItem); 
Navigate(DetailScreen1); 
Reset(SearchBox)

- the formula you are using to Submit the Form:

SubmitForm(yourFormNameHere)

- the OnSuccess action formula of your Form:

Navigate(NewApplicationScreen_3); 
Set(ResetDetailForm1, true); // Not sure what this is for, but most likely not needed

- the Item property of the form:

glbRecord

 

Your problem all stemmed from the Reset on the SearchBox.  When you reset that, it changed the Gallery items because most likely you are searching for items in your gallery based on that control.  Your form then was set to the Selected item of the gallery...since the Gallery was getting re-evaluated (because the search box was reset), the selected record was changing in your form.

The above should clear all that up.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

5 REPLIES 5
RandyHayes
Super User
Super User

@Big_Blue_Bear 

Please provide:

- the OnSelect action formula for your Gallery

- the formula you are using to Submit the Form

- the Item property of the form.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi Randy, please see below:

Please provide:

- the OnSelect action formula for your Gallery - Navigate(DetailScreen1, ScreenTransition.None); Reset(SearchBox)

- the formula you are using to Submit the Form - Navigate(NewApplicationScreen_3); Set(ResetDetailForm1, true);

- the Item property of the form. - BrowseGallery1.Selected

RandyHayes
Super User
Super User

@Big_Blue_Bear 

These formulas should be changed as follows:

- the OnSelect action formula for your Gallery:

Set(glbRecord, ThisItem); 
Navigate(DetailScreen1); 
Reset(SearchBox)

- the formula you are using to Submit the Form:

SubmitForm(yourFormNameHere)

- the OnSuccess action formula of your Form:

Navigate(NewApplicationScreen_3); 
Set(ResetDetailForm1, true); // Not sure what this is for, but most likely not needed

- the Item property of the form:

glbRecord

 

Your problem all stemmed from the Reset on the SearchBox.  When you reset that, it changed the Gallery items because most likely you are searching for items in your gallery based on that control.  Your form then was set to the Selected item of the gallery...since the Gallery was getting re-evaluated (because the search box was reset), the selected record was changing in your form.

The above should clear all that up.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Many thanks Randy - all works now. Your suggestion / solution is much appreciated

RandyHayes
Super User
Super User

@Big_Blue_Bear 

Happy to help!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,114)