cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
renewtx
Frequent Visitor

Launch function does not appear to work

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Community Champion
Community Champion

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)

 

 

View solution in original post

5 REPLIES 5
StalinPonnusamy
Community Champion
Community Champion

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

 

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=...",{},LaunchTarget.Replace)

 

Launch("https://m365mystic.sharepoint.com/sites/dfciepicplanimpl/Lists/Form%20Testing/AllItems.aspx?newTarge...",{},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

StalinPonnusamy
Community Champion
Community Champion

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)

 

 

View solution in original post

StalinPonnusamy
Community Champion
Community Champion

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

 

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.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,174)