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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Canvas App on SharePoi...
Power Apps
Unanswered

Canvas App on SharePoint List (NOT integrated) - browser tab always tells user 'Data maybe lost' even though it's saved

(0) ShareShare
ReportReport
Posted on by 28

Hi Community!

Although there are several posts about saving data out of Power Apps and into SharePoint, I have been unable to find my exact scenario. 

It's an awards site, and people are inputting nominations. After they input their nomination, they need to be redirected to a "thank you" page (or screen - just something that says "Thanks!") and then offered a chance to either nominate another person or leave the site. 
THE SETUP:
Basic SharePoint list, the nominee names are from a lookup column while the nominations are just multi-line text fields. 
The canvas app is just four screens, three of the screens have NEW forms on them to capture the nominations, and the fourth screen is just a 'Thank You' message along with a button that launches the home page of the site. (Originally, I had tagged on the 'Launch(Site_Home_Page.aspx)' in the Submit button, but since that wasn't working, I thought maybe another screen would help. )\

NOTE: The screens are deep-linked and each using the PowerApps webpart displaying inside of a SharePoint page. Each link is tied to a button on the home page. 

In the 'Save Nomination' button's OnSelect: 
SubmitForm(BoldDecisiveForm); ResetForm(BoldDecisiveForm)

 

In the Form's OnSuccess:

Navigate(HubScreen)  (for the 'Thank You' message)

WHAT'S HAPPENING:

All data saves to the list perfectly, by the way. There's no problem there. When the user clicks 'Save Nomination' button, the form resets, the 'Thank You" message on the HubScreen displays. If they DO want to submit another nomination, there's a button on the HubScreen that simply does a "Launch('Site_Home_Page'). It does this in a new browser tab, while leaving the PowerApp tab running.  If the user tries to close the tab where PowerApps is sitting, it gives a message "Leave site? Changes you made may not be saved.".

This happens whether a site page is launched at the end OR navigated to another screen within the app. It seems like once the form is reset, it's sitting and waiting for new data; therefore, the browser thinks that new data is incoming and isn't saved yet. The browser message makes the end user think their nomination wasn't saved and...you can imagine. 

I've tried swapping around the commands, changing the order, moving them between OnSuccess (in the form) and OnSelect (in the button) . The command for 'LaunchTarget.Replace' doesn't work - it actually causes the form to lock up. 

This project is now due next week, and I only just noticed this behaviour. Is there any suggestion I can use to get the form to maybe reset, but don't ask for new data, or something? Am I on the right track? 

Thanks, guys and gals! You've saved me so many times!
 ~ Tracy H

Categories:
I have the same question (0)
  • Verified answer
    Khat Profile Picture
    28 on at

    After I was done laughing myself into a hemorrhage, I realized what I've done here.
    I put an Edit Form onto the screen, and all I need to do is manipulate the mode. Looks like it matters what type of Form you put on your screen to begin with (she said, sarcastically while rolling her eyes at herself). 

    OK - nothing to see here, carry on....problem solved. 

  • 234234456345 Profile Picture
    2 on at

    Problem solved? Not for me. I'll spend the rest of the morning trying to figure out the non-clues you left us with on how to setup a form for no-message exits. Thanks.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard