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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Clear Barcode Scan so ...
Power Apps
Unanswered

Clear Barcode Scan so default Gallery items show

(0) ShareShare
ReportReport
Posted on by 6

I am new to powerapps and I have created a very simple app. It is a sharepoint list that you can search by scanning a barcode. When you scan the barcode the gallery shows the item in the gallery. All I want to do is create a "Clear" button that when you tap it clears the barcode scan so you see all the items in the gallery again. Can someone please tell me how to do this simply?

Capture.JPG
Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @KittyBreath 

    It appears the gallery is being filtered using some variable called ODATA__dlc_BarCodeValue.  Can you please try putting this code in the OnSelect property of your Clear button?

    Set(ODATA__dlc_BarCodeValue,"")

     

    If its a Context Variable you might need to do this instead.

    UpdateContext({ODATA__dlc_BarCodeValue: ""})

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • KittyBreath Profile Picture
    6 on at

    Thanks for the reply, but that did not work. The clear button did nothing.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @KittyBreath ,

    Do you want to clear up the BarcodeScanner1 value when you click the "Clear" button?

     

    Based on the needs that you mentioned, I think the Reset function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

    Set the OnSelect property of the "Clear" button:

    Reset(BarcodeScanner1)

     

    Or

    Set the OnSelect property of the "Clear" button to following:

    Set(IsReset, false);Set(IsReset, true);

    Set the Reset property of the Barcode Scanner control to following:

    IsReset

     

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • KittyBreath Profile Picture
    6 on at

    Thanks for your reply. I had tried the 1st option you gave previously and the clear button did nothing. I just tried your second option and at least the clear button did clear the selection but it just left the gallery blank rather than going back to having the initial list of items in it.

  • Justin_Moz Profile Picture
    53 on at

    You could just enable Clear on your search box and hit the X to clear the scan to return it to the default items.

     

    It sounds like what you're looking for.

  • KittyBreath Profile Picture
    6 on at

    Thanks for the reply, however I am not talking about a search bar. The x you are referring to only applies to a text input. I have a barcode scanner I am trying to clear after the scan.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard