I have a SPO PowerApps form that redirects a user to a thank you page using the below script;

SubmitForm(SharePointForm1);Launch("https://tenant.sharepoint.com/Testing/SitePages/Thanks%20for%20Submitting!.aspx") Exit (true)

With this, the user should only be redirected to the Thank you window.

The thank you window appears as it should, but another window/tab opens with the allitems view of the list they just submitted to.

I’m not sure how to keep this from happening. It should only go to the thank you screen. Has anyone experienced this? If so, I could use your help to fix this issue.

Thanks in advance.

  • quick reminder: If the submit fails, they will still get redirected to your thank you window. You may want to move the "thanks" procedure to the "onsuccess" of the form.
    – Mike2500
    Nov 25 '19 at 18:31

This is not an issue but the expected behavior since Exit() only exits the currently running app/form itself, not the SharePoint list.

There is currently no PowerApps functions to close the SharePoint list. I don’t think your requirement is achievable for the time being.

  • The effect I'm looking for is sort of what used to be done by changing the source destination in on prem. We were able to have the user fill out the form, submit it then be taken to a thank you screen. All with out seeing the list they were submitting to. I think I may have found something that may work using "onsuccess". Do you know of a way to get the same effect?
    – Dee Jay
    Nov 26 '19 at 13:24
  • @DeeJay Yes I’ve tested with “onsuccess” and it cannot be used to close the SharePoint list, at least not with PowerApps functions. Nov 27 '19 at 10:55

Reviving zombie thread here. What I did in this situation is two fold: Create a 'Thank you' page within SharePoint that I want them to see when they correctly submit. Add the following

SubmitForm(SharePointForm1);If(SharePointForm1.Valid, Launch("ThankYouURL"),"")

I'm linking to the specific NewItem form from another page, so I create a button on another SPO page with a url pointing to: https://company.sharepoint.com/...newform.aspx?source=DesiredHomepage.aspx

Combining both of those, if the user presses 'cancel' in the form, they get thrown back to the 'DesiredHomepage.aspx' page. The form only submits if the logic on the form is valid and all fields are filled in. When they submit properly, the form page goes to the homepage and the thankyou page opens in a new tab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.