web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SharePoint List Form: ...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 91

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!!

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    @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.

     

  • apirez Profile Picture
    91 on at

    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! 

  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    @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.

     

     

  • apirez Profile Picture
    91 on at

    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! 

  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    @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 Profile Picture
    6,085 Super User 2024 Season 1 on at

    @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.

  • apirez Profile Picture
    91 on at

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

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    @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.com

  • apirez Profile Picture
    91 on at

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

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    @apirez , the URL at the end is where you want the user to land after SharePoint Saves or Cancel's the form. In my example I used powerapps.com , so you would use what ever URL you wanted the user to land on when they are done with the form.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard