cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MitchC3
Level: Powered On

Patch function doesn't show errors, but won't update SharePoint

I have an icon in a gallery with an OnSelect formula of:

Patch('PO Requisition Master', ThisItem, {Total_x0020_Price: ThisItem.Total_x0020_Price})

It accepts the formula without any indication of error.

 

In SharePoint, total price is a single line text column. Upon creation of a new item, it is left blank (which is fine). After creating, the child items in 'PO Requisition Detail', I want to click this icon to update the total price in SharePoint.

 

In PowerApps, total price is calculated by this:

"$"&Sum(ShowColumns(Filter('PO Requisition Detail', TestID = Gallery_Master.Selected.ID), "Extended_x0020_Price"),Extended_x0020_Price)

 

I'm not sure why it isn't updating.

 

Edit: Total Price in PowerApps is a custom card, is that causing me trouble? I have tried changing it's data field name so the custom card and default card (not shown on any forms) are distinct, but then it can't find it with ThisItem.ChangedName

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Patch function doesn't show errors, but won't update SharePoint

Hi @MitchC3,

 

Could you please share a bit more about your app's configuration?

Does the Sum function formula related to the Total Price work well within your PowerApps app?

Could you please share a bit more about the TestID column within your 'PO Requisition Detail' list?

Further, could you please show more details about your two SP lists?

 

If the Sum function formula that you mentioned works well on your side, please modify the OnSelect formula of the icon as below:

Patch('PO Requisition Master', ThisItem, 
{
Total_x0020_Price: Sum(ShowColumns(Filter('PO Requisition Detail', TestID = ThisItem.ID), "Extended_x0020_Price"),Extended_x0020_Price)
}
)

In addition, the ThisItem operator could only take effect within current parent container, it could not reference other properties within other containers (Display Form or Edit Form).

 

More details about the ThisItem operator within PowerApps, please check the following article:

ThisItem operator

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Patch function doesn't show errors, but won't update SharePoint

Hi @MitchC3,

 

Could you please share a bit more about your app's configuration?

Does the Sum function formula related to the Total Price work well within your PowerApps app?

Could you please share a bit more about the TestID column within your 'PO Requisition Detail' list?

Further, could you please show more details about your two SP lists?

 

If the Sum function formula that you mentioned works well on your side, please modify the OnSelect formula of the icon as below:

Patch('PO Requisition Master', ThisItem, 
{
Total_x0020_Price: Sum(ShowColumns(Filter('PO Requisition Detail', TestID = ThisItem.ID), "Extended_x0020_Price"),Extended_x0020_Price)
}
)

In addition, the ThisItem operator could only take effect within current parent container, it could not reference other properties within other containers (Display Form or Edit Form).

 

More details about the ThisItem operator within PowerApps, please check the following article:

ThisItem operator

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,474)