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 / Launch function does n...
Power Apps
Answered

Launch function does not appear to work

(0) ShareShare
ReportReport
Posted on by 18

Has anyone else had issues with the Launch function not working?  I used Power Apps to create a custom form for a SharePoint list, and when a user saves/submits the form, I want the user to be taken to a specific defined view in that list. 

 

I initially tried just setting the default view of the list to be the view I wanted, but that did not work (whatever view the the user is in when creating/saving a new item, that is the view that will be displayed after submit.

 

So then I thought about using the Launch function to take the user to the view I want (which is obviously just an ASPX page) when submitting a new item by updating the OnSave function of SharePointIntegration for the form as shown below...

 

renewtx_1-1634317552781.png

 

But that does not appear to work.  As an alternative I tried adding a Submit button to the form and then updating OnSelect as shown here to see if that would work ... same result.  

 

renewtx_2-1634318018476.png

 

I've even tried using a URL that goes to just another page in the site (like the Home page) so that it is not a view page, but same issue ... it does not appear to work.

 

Anyone had any luck using the function RECENTLY?  I read a lot of posts where folks have indicated that it works, but most of those are fairly old, so wondering if maybe there is a new bug?

 

Thanks

 

Categories:
I have the same question (0)
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @renewtx 

     

    You need a view id to get it to work. Here is the full URL for the view

    https://tenent.sharepoint.com/sites/<site name>/Lists/<List name>/AllItems.aspx?newTargetListUrl=/sites/Development/Lists/External User&viewpath=/sites/<site name>/Lists/<List name>/AllItems.aspx&viewid=View GUID

     

    Sample from my data source

    https://ltiblogs.sharepoint.com/sites/Development/Lists/External User/AllItems.aspx?newTargetListUrl=/sites/Development/Lists/External User&viewpath=/sites/Development/Lists/External User/AllItems.aspx&viewid=1f88903b-b5df-486a-8e43-4c34925b1c20

     

  • renewtx Profile Picture
    18 on at

    Thanks Stalin,

     

    So I tried that.  I tried two versions of the URL -- the one you sent above, and also just a direct copy from the brower's address bar when I selected a specific view.  I also tried adding the respective Launch() functions to the button OnSelect() as well as the SharePointIntegration OnSave() ... and neither one works.  I have three views defined -- All Items, MyView, and Test View and I want to return to the My View, no matter which view I am on when creating a new item.  The exact functions I tried are:

     

    Launch("https://m365mystic.sharepoint.com/sites/dfciepicplanimpl/Lists/Form%20Testing/My%20View.aspx?viewid=bf2d03e3-4c60-47a2-97d0-3180e4d8ceca",{},LaunchTarget.Replace)

     

    Launch("https://m365mystic.sharepoint.com/sites/dfciepicplanimpl/Lists/Form%20Testing/AllItems.aspx?newTargetListUrl=/sites/dfciepicplanimpl/Lists/Form%20Testing/&viewpath=/sites/dfciepicplanimpl/Lists/Form%20Testing/AllItems.aspx&viewid=bf2d03e3-4c60-47a2-97d0-3180e4d8ceca",{},LaunchTarget.Replace)

     

    Neither of the above works -- the item is submitted and created, but the view does not change.  It's almost like the Launch() function is never executed.

     

    Thanks

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @renewtx 

     

    The launch might be triggered before Save, So we need to move the launch command to the OnSuccess Property of the form.

     

    Please set the OnSuccess Property of Form to

    //Second full URL
    Launch("https://m365mystic.sharepoint.com/sites/dfciepicplanimpl/Lists/Form%20Testing/AllItems.aspx?newTarge...",{},LaunchTarget.Replace)

     

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @renewtx 

     

    I just tested and Targer replace will not works. So remove that target. It should be New.

     

    Launch("https://ltiblogs.sharepoint.com/sites/Development/Lists/External User/AllItems.aspx?newTargetListUrl=/sites/Development/Lists/External User&viewpath=/sites/Development/Lists/External User/AllItems.aspx&viewid=1f88903b-b5df-486a-8e43-4c34925b1c20")

     

    StalinPonnusamy_0-1634323942205.png

     

  • renewtx Profile Picture
    18 on at

    Unfortunately that won't work for our use case.  We need the current window/tab to be refreshed, which is why I was trying to use 'Replace'.  But thanks for confirming that Launch() has issues.

  • automan25 Profile Picture
    74 on at

    Have you found a fix for this? It's now 2023 and I've run into the same issue. When using LaunchTarget.Replace on a PowerApp SharePoint form, Launch does not work. As soon as I remove the LaunchTarget parameter then Launch does work, but of course opens the URL in a new window which is not the desired behavior.

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @automan25 

     

    LaunchTarget.Replace works only with Standalone PowerApps. With the SharePoint form, that may replace the entire list with a new URL. Looks to me like this is expected behavior.

     

    Launch command for Standalone powerApps

    Launch("https://apps.powerapps.com/play/e/default-37ac31e4-f664-4f52-90e5-13173f3460ca/a/4aa83ece-11d2-4eee-8b48-c967cd6667a3?tenantId=37ac31e4-f664-4f52-90e5-13173f3460ca&source=portal",{},LaunchTarget.Replace)

     

    Thanks, Stalin (Microsoft MVP)
    Blog - Learn To Illuminate Blog
    YouTube - Learn To Illuminate Videos

  • automan25 Profile Picture
    74 on at

    That may well be the expected behavior, but as the developer that is not the behavior I want for my users. I wish Microsoft would give us the option.

  • DavidG Profile Picture
    8 on at

    I wish that Microsoft would either fish or cut bait with PowerApps. By withholding options that people have been suggesting for years, it makes them appear that they want PowerApps to not become powerful enough for people consider using PowerApps instead of .NET.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard