Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Patch gallery to sharepoint list

(0) ShareShare
ReportReport
Posted on by

Hello together,

 

I would be thankfull for some help with my topic.

I'm creating a powerapp to manage a warehouse for components we need while producing our machines. For each machine there is a new "shopping cart" with some components that are needed for producing this machine. I built a screen where the warehouseman can add components to the cart and book the cart for one machine that works well. But when the production of the machine is ready, the whole "shopping cart" of components goes back into inventory, so I have to re-book the quantities of components. Here is the point where I'm struggeling with the patch function.

As database I have a sharepoint list with all elements in warehose with its material number as ID, inventory in stock and inventory in circulation.

In a second sharepoint list all removals from stock are listet (these ones from the same shopping cart have the same "Shopping Cart-ID".

Now I'm building a screen, where return of the "shopping carts" can be booked. You can choose one shopping cart id via dropdown on the right top and then the items of this shopping cart are listed in the collection on the left.

Now I need a patch-function, to patch the inventory in stock and inventory in circulation with on-select of the submit-button.

(inventory in stock + quantity of the returned components; inventor in circulation - qnatity of returned components)

luwu_7100_0-1680096190404.png

 

I tried this but its not working:

 

ForAll(
 colReturnCart;
 Patch(
 Elektroteileliste; LookUp(Elektroteileliste; 
 Value(Elektroteileliste[@Materialnumber])=Value(colReturnCart[@Materialnumber]));
 {'Inventory in Stock': Value(LookUp(Elektroteileliste; Value(Materialnumber) = 
 Value(ThisRecord.Materialnumber)).'Inventory in Stock') + colReturnCart[@Quantity];
 'Inventory in circulation': Value(LookUp(Elektroteileliste; Value(Materialnumber) = 
 Value(ThisRecord.Materialnumber)).'Inventory in circulation') - 
 colReturnCart[@Quantity]}
 )
)

 

 Thank you for helping!

 

Lukas

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,653 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard