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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / List Power App not rep...
Power Apps
Answered

List Power App not replacing the current window on close

(2) ShareShare
ReportReport
Posted on by 50
I've got an issue on a couple of apps that are custom forms from a Sharepoint list. 
 
I'm using patch instead of form submit so when they click the Submit button it's doing this.
 
ResetForm(SharePointForm1);
//RequestHide();
Launch("https://site.sharepoint.com/sites/LC-MS");
Exit()
 
It's opening a new tab and launching the page, but it keeps the original tab open in the list view which the user is adamant they do not want users to see.  I can't figure out how to replace the window in a canvas app.  I tried using the {}, LaunchTarget.Replace but that does not work in a canvas app, the button doesn't do anything.
 
Help!!
Categories:
I have the same question (0)
  • MParikh Profile Picture
    521 Super User 2026 Season 1 on at
    HI @BG-15041758-0,

    Use RequestHide() after your Patch, not Launch() or Exit().
    For a SharePoint customized form, try this pattern:
     
    IfError(
        Patch(
            YourSharePointList,
            Defaults(YourSharePointList),
            {
                Title: DataCardValue_Title.Text
            }
        ),
        Notify("Save failed. Please try again.", NotificationType.Error),
        ResetForm(SharePointForm1);
        RequestHide()
    )

    Key point: LaunchTarget. "Replace" is not reliable in a SharePoint custom form. The form is hosted inside SharePoint, and Power Apps does not fully control the browser tab.
    RequestHide() is the supported function for hiding the SharePoint form after save. Microsoft also notes that it should be used in SharePoint custom forms so that SharePoint knows when to close the form.
    If they must land on a specific page, use SharePoint list settings/navigation, not the form button. From inside the custom form, closing the panel is the clean supported option.


    Thank you!
    Proud to be a Super User!
  • BG-15041758-0 Profile Picture
    50 on at
    This won't work on this form.  It is a one to many form that already uses patch on the main and detail lists.  When they are done entering details, I need a way to close the form and direct it back to the home page of the site not the list contents which is where requesthide() was bringing them. 
  • Verified answer
    MParikh Profile Picture
    521 Super User 2026 Season 1 on at
    Thank you for sharing additional details. Let's see if the proposed option can resolve the issue. I would prefer option 1 based on convenience if that works.
     

    SharePoint custom forms open in a panel. RequestHide() closes that panel, and SharePoint then displays whatever page was underneath, which is the list. You cannot change that destination from inside the form. That's a SharePoint behavior, not a Power Apps limitation.

    Option 1: Post-close redirect using SharePoint page navigation

    Instead of fighting the form panel, wrap your list in a SharePoint page that has a custom redirect configured. Use the list's returnUrl parameter. When launching the custom form, append ?Source= to the URL so SharePoint knows where to go after the form closes.

    Example:

    https://site.sharepoint.com/sites/LC-MS/Lists/YourList/newform.aspx?Source=https://site.sharepoint.com/sites/LC-
    RequestHide() will then close the form and SharePoint redirects to the Source URL, not the list.
     

    Option 2: Use Launch() with LaunchTarget.New, then RequestHide()

    You already tried Launch with Replace and it fails in hosted forms. Try this sequence instead:

    IfError(
        Patch(
            YourMainList,
            Defaults(YourMainList),
            {Title: DataCardValue1.Text}
        ),
        Notify("Save failed.", NotificationType.Error),
        Patch(
            YourDetailList,
            Defaults(YourDetailList),
            {RelatedID: SavedRecord.ID, Detail: DataCardValue2.Text}
        )
    );
    Launch("https://site.sharepoint.com/sites/LC-MS", {}, LaunchTarget.New);
    RequestHide()

    This opens the home page in a new tab, then closes the form panel. The user lands on the home page tab. Not perfect, but it eliminates the list view entirely from their focus.


     
  • BG-15041758-0 Profile Picture
    50 on at
    Thanks for the help!
     
    Option 2 I've already tried and it didn't work, but option one worked.  It opens an additional window but it's the home page, so that is much better than the list!  
     
     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard