I am trying to determine the best way to utilise the Barcode scanner for managing stock and equipment.
My current concept is as follows;
1. Using barcodes, scan the equipment and/or stock (this patches straight to sharepoint list)
2. Then fill in the remaining fields of this list with necessary metadata.
I now have a stock and equipment register with the barcode being my unique identifier
Next;
1. If I wanted to track equipment (say for booking to a project), I would then scan the barcode on the equipment.
2. This would then patch to an equipment booking list, where additional data can be entered (e.g. project details)
In order to enforce integrity (ensure that I am booking the right piece of equipment) when I do scan the barcode, information currently sitting in the equipment register, relevant to the item, is pulled from there to be displayed in the app and stored in the equipment list.
So, I am currently unsure if this can be achieved purely from Powerapps and SharePoint, or if I need to try and use a Flow?
Essentially I am thinking - when a barcode is scanned and patches data to SP2 (Equipment booking list), if it matches a barcode in SP1 (Equipment register), then grab 'x' fields from SP1 and put in SP2.
I am open to any suggestions, and if a Flow is the only way to go, then I'll try and work that out.
@v-siky-msft Thanks so much for your help - looking forward to expanding on the possibilities of this now!
Hi @BrendanZ1 ,
Yes, Just add a notification to the else value in If function. If the bar code they scanned is not listed, the app will show a notification on the top of App to show the error message.
If(!IsBlank(VarRecord), Patch('SP list2',Defaults('SP list2'),{Column1: VarRecord.Column1, Column2:VarRecord.Column2}), Notify("Identification Error. Please add this item to the register first.",NotificationType.Error))
Hope this helps.
Sik
I figured this out so it is working perfectly - though to finish this off, I would love some help on how I can alert the user if the bar code they scanned is not listed.
I tested this by scanning a new bar code that wasn't on the register and it worked in that it did not show up on the second SharePoint list.
So ideally I would like to include an alert message to let them know that the scan essentially failed, which should indicate that they need to add this item to the register first.
Thanks for the help - just wanting to clarify, where you have
{Column1: VarRecord.Column1, Column2:VarRecord.Column2}))
Column 1 is the column I have for the Barcode data to go into and Column 2 is data that will come across from SPlist1?
If so, I would just add additional columns to the patch for the other data that I want?
E.G. BarcodeID: VarRecord.BarcodeID, Manufacturer: VarRecord.Manufacturer
Hi @BrendanZ1 ,
I think this can be achieved by PowerApps.
1. first use lookup function to get the record from SP1 (Equipment register), and save it to a variable
2. if the variable is not empty, just Patch the variable value to SP2.
BarcodeScanner1.OnScan:
Set(VarRecord, LookUp('SP list1', UIDColumn=BarcodeScanner1.Value)); If(!IsBlank(VarRecord), Patch('SP list2',Defaults('SP list2'),{Column1: VarRecord.Column1, Column2:VarRecord.Column2}))
Hope this helps.
Sik
WarrenBelz
205
Most Valuable Professional
MS.Ragavendar
108
stampcoin
80