Hi Aarthi,
It sounds like you’re running into Mendix’s default behavior where unsaved changes get discarded when a user clicks outside the form. This happens because changes are only stored in memory until they’re explicitly saved—if you don’t commit them, Mendix rolls the data back to its last saved state.
To fix this, the easiest approach is to make sure users always click a Save button before leaving the form. If you want to prevent accidental data loss, you could add a confirmation prompt when they try to close the form without saving. Another option is to use On Change events to automatically commit changes as they’re made, but be careful with this, as it will save every small edit instantly.
If you’re using a microflow to retrieve the data, you’ll have more control since Mendix won’t automatically roll back the changes. In that case, you’d need to handle saving and discarding manually.
Let me know if you have any issues,
Hope it helps!
o prevent data from reverting to its original state in your application when clicking outside the form, you can implement the following:
Auto-Save Feature: Enable an auto-save feature that automatically saves changes when the user clicks outside the form or after a specified delay.
On Change Event: Use the “On Change” event for the input fields to trigger a save action whenever a change is detected.
Confirmation Prompt: If you want to ensure users are aware of unsaved changes, consider adding a confirmation prompt when they attempt to navigate away from the form.
Implementing these changes will help ensure that data is saved automatically, reducing the likelihood of losing unsaved changes.