cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,168)