cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MaxWendorff
Helper II
Helper II

Subtracting Quantity From A Specific Record NOT ALL RECORDS

Hello, 

I am creating an inventory management app and I have a dilemma. I have 2 share point lists known as "Zone1" and "Zone2". The fields are identical in both they are: "Location",Part Number, and Quantity. Right now i have 2 data tables connected with a form along with a button that moves one record to the other table. Under the "Quantity" section in the form the user can leave it as is and move all of a product or chose to only move a specified value. What I want to have happen is that if there is a 100 pieces in Zone 1, and I want 50 of those in Zone 2 that I simply type in 50 to the form box then it moves. My current code subtracts the appropriate quantity as well as moves the appropriate quantity but it doesn't subtract the specific record (The one selected) it subtracts all the quantity for all the records in the table. 

UseThisImage.PNG

 Any advice would be very helpful and much appreciated!

 

Best.

 

1 ACCEPTED SOLUTION

Accepted Solutions
EricLott
Super User
Super User

UpdateIf() updates all records that match the conditions supplied. You'll want to add an And() function and include a unique identifier such as a row ID. Alternatively, you can use Patch() to update a specific selected record.

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

View solution in original post

1 REPLY 1
EricLott
Super User
Super User

UpdateIf() updates all records that match the conditions supplied. You'll want to add an And() function and include a unique identifier such as a row ID. Alternatively, you can use Patch() to update a specific selected record.

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,908)