Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

check inventory stock

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

Community Support
Community Support

Hi @Hiattech,

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:


        IsBlank(LookUp('YourInventoryList',Barcode = Barcode1)),
        Patch(                  /* <-- There is no same product existed within your Inventory list*/
ProName: ProductName,
Barcode: Barcode1,
Quantity: 1
), Patch( /* <-- There already has one same product existed in your Inventory list*/
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,



Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.


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?


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

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,658)