I have 3 drop downs that have various choices. As you choose more options the the search narrows. I am now wanting to add a barcode scanner into the mix but keep having trouble. Any help would be greatly appreciated.
('Barcode Number' = SearchBarcodeScanner.Value || SearchBarcodeScanner.Value = Blank()) &&
('Building Name'.Value = cbxSearchSchoolName.Selected.Value || cbxSearchSchoolName.Selected.Value = Blank()) &&
('Select Discipline'.Value = cbxSearchDiscipline.Selected.Value || cbxSearchDiscipline.Selected.Value = Blank()) &&
('Select Electrical Equipment Type'.Value = cbxSearchEquipmentType.Selected.Value || 'Select Mechanical Equipment Type'.Value = cbxSearchEquipmentType.Selected.Value || cbxSearchEquipmentType.Selected.Value = Blank())
Please consider changing your Formula to the following:
Filter(USD259_Equip_Assess_DB, (IsBlank(SearchBarcodeScanner.Value ) || 'Barcode Number' = SearchBarcodeScanner.Value) && (IsBlank(cbxSearchSchoolName.Selected.Value) || 'Building Name'.Value = cbxSearchSchoolName.Selected.Value) && (IsBlank(cbxSearchDiscipline.Selected.Value ) || 'Select Discipline'.Value = cbxSearchDiscipline.Selected.Value) && (IsBlank(cbxSearchEquipmentType.Selected.Value ) || 'Select Electrical Equipment Type'.Value = cbxSearchEquipmentType.Selected.Value || 'Select Mechanical Equipment Type'.Value = cbxSearchEquipmentType.Selected.Value) )
I hope this is helpful for you.
I forgot one major item. When I place the barcode scanner code with the the other three search dropdowns(School Name, Discipline, Equipment Type) all of results disappear. I need it to bypass the barcode scanner value if it is blank. Basically what is needing to happen is a person scan a barcode and the result shows up in the gallery or they Use the three dropdowns(combo boxes) filtering the results to what has been chosen.
Here is the result when no search criteria has been entered without the barcode code.
Here is the result when adding the barcode code in with no scan being provided. There is only one record with a barcode number in the database which is what should be coming up.
That logic you are talking about is all in the formula provided.
If the barcode scanner value is blank, then the first part of the logic will be true. That is then And'ed with the remaining logic items.
A little confused on your statement. It seems you are stating that the gallery should be showing the one item with the barcode, but you mentioned that no barcode value was scanned.
AND...are you sure there is no value? If it has been used and not reset, then it will have a value. I would throw a label on the screen to test and set the text property to SearchBarcodeScanner.Value to be certain.
I discovered the error. It was merely the order for what it was searching for. By placing the barcode function as the last function everything stays visible until you provide the scanned barcode. Then the that sole record with the correct barcode is shown.
Keep up to date with current events and community announcements in the Power Apps community.
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Check out the latest Community Blog from the community!