web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How can we prevent use...
Power Apps
Suggested Answer

How can we prevent users from closing the window while data is being written?

(0) ShareShare
ReportReport
Posted on by 22
Hi
 Often, after clicking the "Submit" button, Power Apps takes a few seconds to write data to the SharePoint list, but many employees immediately choose to return or close the window after clicking "Submit," resulting in data not being successfully saved. Is there a way to optimize this? For example, displaying a "loading" page so that other operations can only be performed after the data has been successfully written?
 
Thanks
  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at
    If you are referring to them closing the active browser tag, unfortunately there is nothing you can do to stop this. You could certainly stop them changing screens by setting a Variable before you submit to true and then back to false again after the submission and make the return button disabled when the Variable was true.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • Suggested answer
    danappwiz Profile Picture
    2 on at

    You can use a spinner control with a message like, 'Processing your request. Please don’t close the page until the operation is complete.' This helps reassure users while the operation is running. You can also set up the 'ConfirmExit' and 'ConfirmExitMessage' properties to warn users if they try to close the tab while the process is still underway. If this issue continues to be a problem, you might want to use an instant flow in Power Automate instead of relying on a PowerApps formula. With Power Automate, the operation runs independently, so it won’t be interrupted. Just make sure to handle any errors in advance. Otherwise, if a user navigates away, they won’t see any error messages or responses. If you can't control these errors by disabling the submit button or showing notifications in the app then you might consider logging errors or sending email notifications to keep users informed.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard