I am using the Sharepoint list app template (with a few minor modifications) and want to allow users to either search by typing or search by using a barcode. However, I haven't quite figured out how to get the gallery to allow filtering by both, just one or the other.
This is the default code that works which works perfectly for searching my gallery from the search bar, but any injection I've added doesn't allow me to get results from the scanner.
SortByColumns(Filter([@'TBC Staging Inventory'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))
I've also tried to get the scanner to output the results to the search bar, but after scan it doesn't do anything.
OnVisibile (Screen)
UpdateContext({scannedValue: Blank()})
OnScan (Barcode Scanner)
UpdateContext({scannedValue: First(BarcodeReader.Barcodes).Value})
Default (Search box)
If(IsBlank(ScannedValue), YourListName, Filter(YourListName, Barcode = scannedValue))
Any input would be greatly appreciated!