I have an sql database that I have created a PowerApps form for. When I go to edit a field where I already have data say an existing store address and I start changing the address then decide to cancel via cancel button I have created "ResetForm('Store Info'); ViewForm('Store Info')" a message box that I have created to keep people from accidently exiting a form they are editing without saving thinks there are changes that are still pending. The message box is visible via - 'Store Info'.Unsaved . Even though the changes were not saved on the form. If you go back and edit the form and click on save then the message box will disapear even though there isn't any changes displayed. Has anyone else run into this?
Hi @ProfileSanford ,
Could you please share a bit more about your scenario?
Is there something issue with your app?
Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side.
Actually, in default, when you open your Edit form in New mode or Edit mode, the EditForm.Unsaved formula would return false.
If you made some changes to your Edit form, the EditForm.Unsaved formula would return true. So if you set the Visible property of the Message Box to:
and you made some changes to your Edit form, the Message Box would be displayed continuously. The Message Box would disappear when your undo your changes within your Edit form or Submit your form.
Thank you for the quick responce. I just realized that I'm only getting this error when I start typing in a blank field and then cancel out of the form. If I cancel out of the form after changing a field that already has text in it everything works fine also when I click on save. As an example I have two lines for a store address (1.png). If line 2 is empty and I start typing something in like "Suite 2" I get my warning message as I should and if I click on my save button the message will go away. If however I hit my cancel button and the form goes back to view mode my warning message stays on the screen (3.png). The 2nd address field still shows empty however if I go back to editing the form (address 2 is still blank) and I click on Save the form will go back to view mode and the text I currently had typed in "Suite 2" before hitting cancel now shows up.
Learn how to create your own user groups today!
Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!
Check out the new Power Platform Community Connections gallery!