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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (2,166)