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:
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