cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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? 

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.

@dscience29 

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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
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. 

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

Frequent Visitor

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

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,900)