0

I have a list and we have customized the edit form in Power Apps. We have set this forms link in Email that we send to manager when new entry is added. He must review it and change status choice to approve and click save. But we need to open our homepage on submit click instead redirecting to list, we need to redirect to homepage.

We have tried below solutions so far:

  • Use source parameter as we do in classic site but it is not working. We are redirecting to list.

Reference - Customize newform save button - Save and redirect to another form

  • Use launch command. In this we have provided Launch option with home page and with demo page as well. In this scenario, the page is open in new tab. and current tab is redirecting to list.Here is my save code -
SubmitForm(SharePointForm1); Launch("Home page URL or Demo test page url");

Reference - https://powerusers.microsoft.com/t5/Building-Power-Apps/Submit-form-and-navigate-to-different-screen-Not-SharePoint/m-p/73761

  • Use launch command with Launch Target option. I tried the latest replace option as well. But still we are redirecting to the list. Here is my save code -
SubmitForm(SharePointForm1); Launch("Home page URL",{},LaunchTarget.Replace);

Reference - https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Launch-URL-from-within-PowerApps-form-IN-THE-SAME-TAB/idi-p/279955#:~:text=Launch%20URL%20from%20within%20PowerApps%20form%20%2D%20IN%20THE%20SAME%20TAB&text=If%20that%20is%20not%20wanted,rather%20than%20the%20same%20tab.

Can someone help me with this?

2

The mentioned methods do not work for SharePoint custom forms, as is shown in the UserVoice post.

And also quoting the community announcement post:

LaunchTarget does not work in embedded apps, such as apps hosted in Power BI or SharePoint, and should be avoided.

Using Launch function for redirection on the form (in OnSuccess property, for example) will work perfectly if you are on a canvas app, but PowerApps forms will always go back to the attached list after submission.

A well-known workaround would be inserting a button with both Launch and SubmitForm functions on the form. Clicking the button will open the homepage in a separate tab, while keeping the redirection to the list.

0

Try using Launch() function in OnSuccess property of Form control.

Also note below points if it affects anything with SharePoint forms:

The LaunchTarget argument is currently in Preview and will be released in all regions soon. For more details about preview features, go to Understand experimental, preview, and deprecated features in Power Apps.

Using a LaunchTarget with any value other than New in embedded scenarios (for example, Power BI or SharePoint) is not supported and may result in unexpected behavior. In the future, this behavior may change, or may cause an error.

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.