cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jfrancis
Level: Powered On

SharePoint Integration - OnCancel I want to user to open a different URL

I want the user to be redirected to a different URL when they hit the cancel button in a sharepoint list custom form.  I have been successful in the past with the onsave button using Launch() to redirect after submition, the same code does not seem to work on the oncancel button.

 

Code sample

ResetForm(SharePointForm1);Launch("https://webaddress")

 

Thanks in advance

JF

6 REPLIES 6
Dual Super User
Dual Super User

Re: SharePoint Integration - OnCancel I want to user to open a different URL

Hi @jfrancis 

 

On the SharePoint integration node - OnCancel method

 

use 

Launch("url");ResetForm(SharePointForm1)

 

Tested this out to make sure it works

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

jfrancis
Level: Powered On

Re: SharePoint Integration - OnCancel I want to user to open a different URL

Reza

 

Thanks for the quick reply i tried what you suggested but it did not work.  It looped me back to the all items page:

 

Launch("http://www.google.com");ResetForm(SharePointForm1)

 

JF 

Dual Super User
Dual Super User

Re: SharePoint Integration - OnCancel I want to user to open a different URL

Hi @jfrancis 

 

It will launch google and then go to list screen (that is by design)

Highlighted
jfrancis
Level: Powered On

Re: SharePoint Integration - OnCancel I want to user to open a different URL

Reza

 

Thats not the behaviour i am seeing.  Launch never opens a new tab in browser for web page.  I just opens the allitems.aspx in the parent page.  I never see the google page open at all and no pop-up warnings either.

 

The same code on here: SubmitForm(SharePointForm1);Launch("https://xxx.xxx.com/:u:/r/sites/xxx/forms/SitePages/Thank-You.aspx?csf=1&e=Hz13S3")

Works corectly takes me to correct page in a new tab but leaves the form open.

 

I am tring to avoid users going to the all items page all together. I want them to goto intranet page if they cancel.

 

TY

Dual Super User
Dual Super User

Re: SharePoint Integration - OnCancel I want to user to open a different URL

Hi @jfrancis 

 

Capture.PNG

 

This works for me 

 

However it does show both allitems and the new browser

So no way to stop the user going to allitems even by doing the above (default behavior of cancel)

 

 

BB9
Level: Powered On

Re: SharePoint Integration - OnCancel I want to user to open a different URL

I think what you said is correct. 

 

I have been fighting with this thing from many days, trying to get the user to redirect to a different URL or the home page of the site rather than the 'AllItems' page. I have tried using Navigate() and Launch with no luck. Let me know if you find a way to resolve this.

 

One thing that I did:

I changed the data that the AllItems view show to the user. Restricted it to only show the items that the user created (Use [Me] in the Edit view filters) so that we can restrict some infomation atleast. I wish there are other options for OnCancel. Thanks!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,233)