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.
Solved! Go to Solution.
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.
Please provide:
- the OnSelect action formula for your Gallery
- the formula you are using to Submit the Form
- the Item property of the form.
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
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.
Many thanks Randy - all works now. Your suggestion / solution is much appreciated
Happy to help!