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
I have the same question (0)
  • WarrenBelz Profile Picture
    154,797 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard