cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Updating Column Sharepoint list with Powerapps

Hello, pros in Powerapps!I have an issue.

I'm new in powerapps  .

I want to build an app work like inventory and stocks.
first, I have the item name with QuantityOFITEM 
for example 

item nameQuantityOFITEM 
PEN20

 

 When I  want to send the items From HQ Branch to another branch  with QuantityOFITEMOUT 

but should update  QuantityOFITEM  after I sent item with QuantityOFITEMOUT also QuantityOFITEMOUT should not be bigger than QuantityOFITEM  


for example :

item nameQuantityOFITEM QuantityOFITEMOUT
PEN2010

 

QuantityOFITEM =QuantityOFITEM -QuantityOFITEMOUT = 10

how I update my SharePoint list to be like this 

item nameQuantityOFITEM QuantityOFITEMOUT
PEN1010

 

 

another case :
there is QuantityOFITEMIN  when I buy items from a supplier 
for example :

item nameQuantityOFITEMIN
PEN15



QuantityOFITEM =QuantityOFITEM +QuantityOFITEMIN


After I update the value in SharePoint  and be like that  :

item nameQuantityOFITEM QuantityOFITEMOUTQuantityOFITEMIN
PEN251015



 Capture.PNG


should I create 3 lists or just 1 list enough

Please help me to create the codes.

BR

From Mahmoud

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Updating Column Sharepoint list with Powerapps

Hi @mahmouddahbour ,

One list will do the job. You just need two buttons - one for items out and one for Items in.

Have a text box to enter the relevant quantity - I will call it txtItems in the code below. So on the Out Button (placed inside the form on a custom card). This solution does not need the other two fields.

If(
   Value(txtItems.Text) > QuantityOFITEMS,
   Notify("You do not have enough stock",NotificationType.Error),
   UpdateIf(
      YourListName,
      ThisItem,
      {QuantityOFITEM:QuantityOFITEM-Value(txtItems.Text}
   )
)

On the In Button

UpdateIf(
   YourListName,
   ThisItem,
   {QuantityOFITEM:QuantityOFITEM+Value(txtItems.Text}
   )

If you wanted to keep a record of individual movements, you would simply update the items in and out at the same time.

 

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.

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Updating Column Sharepoint list with Powerapps

Hi @mahmouddahbour ,

One list will do the job. You just need two buttons - one for items out and one for Items in.

Have a text box to enter the relevant quantity - I will call it txtItems in the code below. So on the Out Button (placed inside the form on a custom card). This solution does not need the other two fields.

If(
   Value(txtItems.Text) > QuantityOFITEMS,
   Notify("You do not have enough stock",NotificationType.Error),
   UpdateIf(
      YourListName,
      ThisItem,
      {QuantityOFITEM:QuantityOFITEM-Value(txtItems.Text}
   )
)

On the In Button

UpdateIf(
   YourListName,
   ThisItem,
   {QuantityOFITEM:QuantityOFITEM+Value(txtItems.Text}
   )

If you wanted to keep a record of individual movements, you would simply update the items in and out at the same time.

 

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.

View solution in original post

Highlighted
Frequent Visitor

Re: Updating Column Sharepoint list with Powerapps

1.PNG2.PNG

 

I have a form which I should submit it.
in order to save items with all data.

 

Highlighted
Super User III
Super User III

Re: Updating Column Sharepoint list with Powerapps

Thanks @mahmouddahbour ,

That complicates it a more than a little (particularly if you want to use SubmitForm). Please consider using UpdateIf() or Patch() on the rest of the fields - happy to assist once you have put some code together.

 

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.

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

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

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