web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Barcode Scanner - Sear...
Power Apps
Unanswered

Barcode Scanner - Search Box Issue

(0) ShareShare
ReportReport
Posted on by 4

I am having trouble with the barcode scanner/search box integration in my app.  I've created an inventory tracking app and have a screen where it is meant to list all items.  Screen uses a gallery to list the items then has a search box, I added a button to bring up barcode scanner.  If I type in the search box the filter works on the items, if I then hit button to scan it also works.  Now, after I scan the first time if I then delete everything out of the search box to get the gallery to repopulate with all items the next time I go to barcode scan it will not fill the search box.  The scanner opens and scans but does not fill the box.  I want to be able to scan then clear to get list to show all again when done.

 

I have the search box Default set to BarcodeScanner2.Value.  Can anyone help?  I've exhaustedly searched google and have not found any solution.

 

Screenshot of my app screen for reference:

Rices_0-1643820019686.png

 

Categories:
I have the same question (0)
  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Okay... I would do something like this:

    1. OnScan property write: 
    Set(varFilter, BarcodeScanner2.Value)

    2. On Itens of the Gallery write:
    If( IsBlank(SearchInput.Text), 

        SHOW ALL ITENS, 

        Filter(SharepointList, ItemName = varFilter)

    )

    3. On Default of the search input write:

    varFilter

     

    4. When you reset the inventory write:
    Set(varFitler, "")

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Rices Profile Picture
    4 on at

    @Nogueira1306 having trouble with number 2 and 4.  If you don't mind providing a little more assistance. 

     

    For number two right now I have the items of the gallery set at:

    SortByColumns(Filter([@'DAO Inventory'], StartsWith(PartNumber, TextSearchBox1.Text)), "PartNumber", If(SortDescending1, Descending, Ascending))

     

    I can't get your formula to work there it errors out.

     

    For number 4:

    Do I change the reset value on the search box to that formula?

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    If( IsBlank(TextSearchBox1.Text),

     

    SortByColumns([@'DAO] Inventory, "PartNumber", If(SortDescending1, Descending, Ascending)),

     

    SortByColumns(Filter([@'DAO Inventory'], StartsWith(PartNumber, TextSearchBox1.Text)), "PartNumber", If(SortDescending1, Descending, Ascending))

     

    )

     

     

    For number 4:

     

    When do you reset the gallery? You have a button, right?
    Write that when you reset the gallery

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard