Announcements
I am trying to substract 1 from the Quantity field inside a Patch, i tried this:-
Patch('Spare Parts',LookUp('Spare Parts',ID=varnewWOSP.'Spare Part ID'),{Quantity:Quantity-1});
but i got that second Quantity can not be found.. any advice?
Hi @johnjohnPter ,Assuming you have a Quantity field in 'Spare Parts'
With( { _Record: LookUp( 'Spare Parts', ID = varnewWOSP.'Spare Part ID' ) }, Patch( 'Spare Parts', { ID: _Record.ID, Quantity: _Record.Quantity - 1 } ) );
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
@WarrenBelz ok worked thanks
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 345 Super User 2026 Season 2
Mohsin Ali 225
M Bilal Khan 192