cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simkessy
Helper I
Helper I

App will not close after Patch

I'm trying to get the application to close after patching but it just stays open: 

If(SPForm.Mode = FormMode.New,
    Patch(
        ParentList,
        Defaults(ParentList),
        {
            Title: formTitle.Text, 
            child: ForAll(ChildSelector.SelectedItems,{       '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                Id: ID, 
                Value: Title 
                })
        }
    ); ResetForm(SPForm);RequestHide(),
    Patch(
        ParentList, 
        SharePointIntegration.Selected, 
        {
            Title: formTitle.Text, 
            child: ForAll(ChildSelector.SelectedItems,{       '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                Id: ID, 
                Value: Title 
                })
        }
    ); ResetForm(SPForm);RequestHide();
);
ResetForm(SPForm);RequestHide()

 

26 REPLIES 26

Oh wow, that's really not good 😛 

 

Hopefully they fix it soon but where would someone keep track of that. Is there a PowerApps status page somewhere, is MS even aware of this, or do we just wait around until someone responds here and hope they're working on it? 

Anonymous
Not applicable

No idea, looks like @RandyHayes notified the Admins here (thanks, Randy!), so hopefully they'll look into it soon.  

 

A couple of other things I tried:

 

I tried creating a Button that would perform the same actions as the OnSuccess option ( ResetForm(SharepointForm1); RequestHide() ), and it reset the form but didn't hide the app.  When I removed the RequestHide() option from the Button and replaced it with Exit(), the Exit function worked fine, but that function doesn't close the window or return you to the SP list like the RequestHide function does. 

 

I also tried setting the OnSuccess criteria to just RequestHide() and nothing happened.

 

So it seems that this issue is specific to the RequestHide() function.

@Anonymous 

Yes, it is definitely the RequestHide() that is failing. 

@simkessy 

Yes, it would be nice to have such an update on these issues.  The support page is usually where we can go for status updates, but the only thing listed there is from May 13 Smiley Frustrated

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
Anonymous
Not applicable

Thanks for reporting this everyone and I'm sorry about the issue. I will update the team 

 

@Anonymous 

I have the same problem. My customized list form does not close when I click on Save. It saved the data but It stays open. 

okoelle
Regular Visitor

I also have that problem. Customized SharePoint form. After clicking save, form stays open and content gets replaced by 2nd item in the list. Original content is saved, though. It seems another click on save does not do anything: the 2nd item is not updated.

 

Switching to a standard SharePoint form now - but can't get rid of the content type showing up. Workaround for that seems to be only PowerApps....

ebaron
Advocate I
Advocate I

In my side, it's working when I edit an existing item. It's when I create an item that I've this issue.

josnayo2
Frequent Visitor

Still not working. Any solution for saving the customized PowerApps form in SharePoint list?

chmoncayMSFT
Power Apps
Power Apps


@simkessy wrote:

I'm trying to get the application to close after patching but it just stays open: 

If(SPForm.Mode = FormMode.New,
    Patch(
        ParentList,
        Defaults(ParentList),
        {
            Title: formTitle.Text, 
            child: ForAll(ChildSelector.SelectedItems,{       '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                Id: ID, 
                Value: Title 
                })
        }
    ); ResetForm(SPForm);RequestHide(),
    Patch(
        ParentList, 
        SharePointIntegration.Selected, 
        {
            Title: formTitle.Text, 
            child: ForAll(ChildSelector.SelectedItems,{       '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                Id: ID, 
                Value: Title 
                })
        }
    ); ResetForm(SPForm);RequestHide();
);
ResetForm(SPForm);RequestHide()

 



Hi there, I've created a new list and customized a form using PowerApps.  Within my app, I've created a button which performs a patch similar to your example.  The code is working correctly and my app is closing.  Can you validate that this behaviour has rectified itself?

my custom form is now working correctly.  it closes after succesfull form submit.  thank you @chmoncayMSFT 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,495)