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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / check inventory stock
Power Apps
Unanswered

check inventory stock

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am building an app that will list the inventory of our field service techs vans. so far I have it setup so they can pull up their inventory and add or subtract items as they use things.  The next part of the app I want to use is an inventory section.  Once or twice a year, the techs have to do a full inventory of their vans and submit any differences.  I have a page created that will use the barcode scanner (if that's a good option) and then a gallery below it.  I would like the app to scan the barcode and as it scans each one, it will pull up the info from the list so the tech can verify what they scanned, and add it to an inventory list (this would need to be clearable when they start a new inventory). if multiple items are scanned, it should not add another entry, but increase the quantity listed for that item.  Once done, the tech can then go into the list and do a comparison if he is short or over on items. 

 

I'm fairly new to PowerApps but I have been trying my best to learn all I can.  I'm not sure really where to start or if there are any good videos/documents that can help jump start me.  Here's basically what I have for the inventory page.  Right now it's listing all the items in the list which I don't want it to do.  Only the items that have been scanned.  But, like I said, I'm not really sure where to start.  I'm thinking I need to create a collection though . . . 

 

Inventory App.JPG

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Could you please share a bit more about your SP list?

    Do you add a column within your SP list to store barcode value of the corresponding product?

    I suppose that you have added a column in your SP list to store the barcode vlaue of the corresponding product, is it true?

    If you only want to display the records within the Gallery based on the barcode value the Barcode control scanned, I have made a test on my side, please take a try with the following workaround:2.JPG

    Set the Items property of the Gallery control (Gallery1) to following:

     

    If(!IsBlank(Barcode1.Text),Filter(RecordsCollection, Barcode = Barcode1.Text))

    On your side, you should type following:

     

    If(!IsBlank(Barcode1.Text),Filter('YourSPList', Barcode = Barcode1.Text)) 

    Note: <-- Barcode represents the column in your SP list, which stores the barcode value of the corresponding product. The 'YourSPList' represents the SP list which you pull data from into your Gallery.

     

     

    In addition, if you want to save the pulled info (scanned via Barcode control) from your Gallery into your Inventory list, please take a try with the following workaround:

     

    ForAll(
     RenameColumns(Gallery1.AllItems,"Barcode","Barcode1")
     If(
     IsBlank(LookUp('YourInventoryList',Barcode = Barcode1)),
     Patch( /* <-- There is no same product existed within your Inventory list*/
    'YourInventoryList',
    Defaults('YourInventoryList'),
    {
    ProName: ProductName,
    Barcode: Barcode1,
    Quantity: 1
    ...
    }
    ), Patch( /* <-- There already has one same product existed in your Inventory list*/
    'YourInventoryList',
    LookUp('YourInventoryList',Barcode=Barcode1),
    {
    Quantity: LookUp('YourInventoryList',Barcode = Barcode1, Quantity) + 1
    }
    ) ) )

    Note: The Barcode, Quantity are both columns in your Inventoty list. The Barcode column used to store the barcode value of the corresponding product. The Quantity used to store the amount of the corresponding product.

     

    More details about the ForAll function, Patch function and LookUp function, please check the following article:

    ForAll function

    Patch function

    LookUp function

     

    Best regards,

    Kris

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Guess I took a bit long to respond so the solution was considered accepted.  Sorry about that, I was traveling.  

     

    To respond to your question, the first column in the list contains the numbers associated with the barcodes.  The second column is the name of the item, the third is how many are in stock, the fourth contains the picture (something I'm still working on) and the fifth is the inventory check column (which would contain how many we have scanned for our current inventory check.  

     

    I'll review the information you have provided for me next week as I continue to work on the app and see if that solves my issue.  Thanks a lot for the help.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have tried to implement this code but I'm having issues.  When I try 

    If(!IsBlank(Barcode1.Text),Filter('Truck Inventory', CIMs_Number = Barcode1.Text))

    it tells me the Barcode field is a number and can't be compared to Barcode1.Text

     

    As for the second part of the code with the ForAll, is that being attached to a button or does that work on the fly?

  • dougjr17 Profile Picture
    2 on at

    Please ignore prior reply as it was intended for a different topic.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard