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...
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.
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
Solved! Go to Solution.
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)
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
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)
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")
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.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
203 | |
71 | |
51 | |
49 | |
20 |
User | Count |
---|---|
263 | |
123 | |
85 | |
79 | |
70 |