cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
apirez
Helper II
Helper II

SharePoint List Form: OnCancel navigate to another page in same tab

Hello All,

Im looking to control the behavior of what happens when someone presses "Cancel" in my form. I dont want them to be able to see the list. I want to send them to a different URL in the same window, essentially not letting them see the entirety of the list. I tried 
Launch("URL", {}, LaunchTarget.Replace) and it does nothing. I dont have the ability to use Launch("URL", {}, LaunchTarget.self) as it errors out.

 

Help!!

11 REPLIES 11
WarrenBelz
Super User
Super User

@apirez ,

Is this a SharePoint Integrated form and are you referring to the built-in "Cancel" button? The OnCancel function in SharePointIntegration - is this what you are using)?

Do you have more than one screen in your app? If so, you need the Navigate() function.

Please clarify.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

HI @WarrenBelz,

Yes its the integrated form. I dont want folks to see the sharepoint list on redirect if they cancel out of the form. They are getting the form through a link and takes them right to the item. Thanks! 

@apirez ,

I suggest you make a standalone Canvas app - closing the form will always give them access to the list it is based on. You can actually copy and paste your current form into one once you connect the data.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

hi @WarrenBelz ,

Thanks for your help! I thought of that, but where I got tripped up is the link portion. I use a canvas app for the entry piece. I use MS Flow to send an email to the individual tagged as the “approver” that includes a link where they need to approve or not approve the item. The approval is managed using a drop down and not traditional built in content approvals. 

is there a way to make the canvas app the approval method once they click this link? I’m thinking more for future apps. This one was put together in a hurry and is very short term. 

thanks! 

@apirez ,

Deep linking works much better on Canvas apps - here is a good video from Shane Young @Shanescows on the subject.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Jeff_Thorpe
Super User
Super User

@apirez , if you add the parameter Source=https://powerapps.com to the link people are using SharePoint will redirect you that URL when you click cancel or save. I do believe the "S" has to be capitalized.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

@Jeff_Thorpe @Where do I do that?? Thanks!

Jeff_Thorpe
Super User
Super User

@apirez , if I understood this correctly you are already sending a link to the approvers. The link you are sending out needs to have the parameter "Source=https://SendThemToThisURL" added to the end of the URL that makes up the link that is being sent to the approvers.

 

The URL for the link would look something like this:

https://xxxxx.sharepoint.com/teams/Site/Lists/Requests/DispForm.aspx?ID=425&Source=https://powerapps...



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

@Jeff_Thorpe @Ok I think I understand. The end of it would be the full power apps link though, correct? Thanks!

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 (3,485)