I changed data in text and dropdown values which is there in gallery and when i click on back button it should popup there is unsaved values else it should be back page.
Solved! Go to Solution.
That's simple, please apply the following steps :
This should work for you.
You will need two things:
1) Some indicator (formula) to determine that there are actually changes.
2) A popup series of controls (I would recommend this in a Component to be reusable).
Without knowing any more details about your scenario, this is about all I can suggest at this point.
I hope this is helpful for you.
I created a popup already but i am not sure how to write formula
@rocky5 we can only help more if you give us more specifics of your app and may help to attach screenshots too.
In order to prevent hitting back, you need to select the top level app page and then set the "Confirm Exit" to true. Then set a message. This is the only way to prevent closing of the app without putting up a message etc. Giving them the option to leave or cancel.
*This assumes by back you mean browser back button. If you mean a back button/icon/image you created in your app, then it's a different scenario :).
Tell me more about what you have designed. However, more importantly is going to be - how are you determining if there is a change? You mention this is a Gallery...what are you doing in the Gallery to enact changes?
@RandyHayes i have updated with pictures in post can you let me know how to do with above changes
@jatcube i have updated with pictures in post can you let me know how to do with above changes
@cwebb365 i have updated with pictures can you let me know how to do with above changes
@rocky5 the simplest solution I can think of is using the
OnChange
property of your controls to set a variable to true, such as
Set(varDataChanged, true)
and then check for that condition when user clicks on the back button, such as
OnSelect = If(varDataChanged, 'showPopUp', Back())
Of course, this is very simple logic and doesn't tell you if data actually did change, or whether the control was just used, but it may be enough to simply prompt the user that there may be unsaved changes. If you want to be a bit more specific, you can set a hidden checkbox per row to true and then you can point the user to the row that may have unsaved data. Something like this maybe? Add check box in every row of gallery and use collection object to store selected record | Softchief...
Or you can compare default values to current values on controls and then set the variable.
As I said, many ways to go about this, really depends on what you want exactly and how critical is it that you identify individual changes.
How do you save the data by the way?
If you found this response useful, give it a thumbs up and don’t forget to mark your post answered to help others find the solution easier.
User | Count |
---|---|
258 | |
108 | |
93 | |
57 | |
40 |