web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Plus Minus Buttons for...
Power Apps
Unanswered

Plus Minus Buttons for inventory

(0) ShareShare
ReportReport
Posted on by

Hi there

 

I am looking to build an inventory app. What I have so far is the following:

 

Patch(Sheet3, TemplateGallery3.Selected, {Part1: Part1 -1})

 

All I'm getting are errors, and everywhere I read says to do it this way. Please help!

 

Also, if I want to build a list for one unit, it is my understanding here that the Patch() is like the following: Patch(Source, Row, {Column}). Example, if I have rows 1-3 set up in a sheet, can I set it up so that row 1, col 3 is "blue lugs" and row 2, col 3 is "red lugs" and row 3, col 3 is "black lugs" and so on?

 

Thanks in advance for your help.

Categories:
I have the same question (0)
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @Anonymous ,

     

    Can you share the errors you are getting? 

     

    If I'm not wrong, you're trying to directly update the database. If you intend to click multiple times on your "Add" button, there is a risk where the updates may collide server-side.

     

    I recommend you first update a local collection, then update the database with said collection.

  • Community Power Platform Member Profile Picture
    on at

    @WiZey 

     

    The error I'm getting for this formula is "Name isn't valid. Identifier not recognized."

    Patch(Sheet3, TemplateGalleryList3.Selected, {Part1: Part1 +1})  <-- Error location

  • WiZey Profile Picture
    3,023 Moderator on at

    I tried on my side and understood why the error occurred.

     

    You actually need to reference "Part1" from a source (from the item of the gallery).

     

    Can you try this formula and see if it works?

    Patch(Sheet3, ThisItem, {Part1: ThisItem.Part1 +1})

     

  • Community Power Platform Member Profile Picture
    on at

    Awesome! Thank you! There are no more errors now, but it still doesn't change any values in my table. I'm not sure what I'm doing wrong.

  • WiZey Profile Picture
    3,023 Moderator on at

    It may by a lag from the server. Depending on your database, performance can vary greatly. Excel is the least recommended while DataVerse is the most recommended while others stand in-between.

     

    If you still see no changes in your table for a while, I suggest you add a delay between each patch to avoid "updates collision" if you intend to directly update your datasource. Otherwise, I recommend you to actually apply all your updates in a local collection then patch with a button press to avoid such complications.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard