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 . . .
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:
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*/
), 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:
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?
Check it out!
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand