Hi all,
I have an app with a Gallery (Gallery2) on the home screen. When a user clicks the edit icon it takes them to a screen with an edit form on it.
The Edit icon has an OnSelect:
ResetForm(frmPhase1); ResetForm(frmPhase2); ResetForm(frmPhase2_1); ResetForm(frmPhase3); ResetForm(frmEmergencyServices); ResetForm('frmHCC/OCC_2'); ResetForm(frmLondonBoroughs_1); Set(varFormData, ThisItem); Navigate(Phase1); Select(Parent); UpdateContext({varEdit: false})
The save form button has an OnSelect of:
SubmitForm(frmPhase1); If(IsEmpty(Errors(OverpaymentDatabase)), Notify("Successfully Saved", NotificationType.Success) && Navigate(Success); Notify(First(Errors(OverpaymentDatabase)).Message, NotificationType.Error))
I then have a simple success screen. I want the user to go to this screen, then navigate back to the screen they were just on. However when they click the ok button (with onselect: ResetForm(frmPhase1); ResetForm(frmPhase2); ResetForm(frmPhase2_1); ResetForm(frmPhase3); ResetForm(frmEmergencyServices); ResetForm('frmHCC/OCC_2'); ResetForm(frmLondonBoroughs_1); Back(); UpdateContext({varEdit: false}) ) it takes the user back to the previous screen, but the changes the user just made don't appear in the form.
Why does the newly submitted information now appear in the form? It must be something to do with the data source not refreshing, or the OK button somehow not refreshing the selected item from Gallery2.
Thanks,
Freddie
Solved! Go to Solution.
Hi Shivam,
I have actually solved the issue myself. It was to do with the reset form, which I must have left by accident in some of my OnVisibles on the different screens. I removed them and now it seems to work fine.
Rather than navigating away from the screen, I also not just use a variable which blocks the screen rather than navigating away from it. This seems to work well!
Thanks for replying to me 🙂
Freddie
hey @Anonymous I just want an information from you that what you want to do like :-
- You want the users to be sent on the main page from where they have just clicked on the pencil icon instead of going back on OK button pressed then you need to change your code as follows :-
ResetForm(frmPhase1); ResetForm(frmPhase2); ResetForm(frmPhase2_1); ResetForm(frmPhase3); ResetForm(frmEmergencyServices); ResetForm('frmHCC/OCC_2'); ResetForm(frmLondonBoroughs_1); Navigate(Screen Name).
Note - Screen Name is same as on which you have gallery2.
And your answer about last thing why data is not displayed which is changed by the user on going back just because you have use ResetForm() which results in resetting the data after clicking on ok button so you will find nothing there.
Hi Shivam,
I have actually solved the issue myself. It was to do with the reset form, which I must have left by accident in some of my OnVisibles on the different screens. I removed them and now it seems to work fine.
Rather than navigating away from the screen, I also not just use a variable which blocks the screen rather than navigating away from it. This seems to work well!
Thanks for replying to me 🙂
Freddie
User | Count |
---|---|
252 | |
106 | |
96 | |
50 | |
39 |