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 to che...
Power Apps
Unanswered

Barcode scanner to checkbox

(0) ShareShare
ReportReport
Posted on by 8

Hello,

My app behaves as an equipment inventory, with functionality for checking in and checking out items. The Check In and Check Out pages are galleries with checkboxes for each item, as well as a dropdown menu and search bar for filtering. When an item's checkbox is toggled on, the OnCheck property collects to a Google sheet the name of the item, whether it's being checked in or out, and who is interacting with the item. Everything on that end works as it should.

 

I also have a barcode scanner functionality, which can scan an item's physical barcode, and immediately sticks the serial number in the search bar. Once the serial number is in the search bar the gallery automatically filters to find the corresponding item. What I would LIKE to happen here is once the gallery filters for the correct item, it also automatically toggles the checkbox on -- rather than the user manually checking the box.

 

Is this something that I can accomplish? Here is a screenshot of the check in gallery and the screen once a barcode is scanned and filtered.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @geoUPA ,

    On the end of the code set a Variable

    UpdateContext({vChecked:true});
    Reset(CheckBoxName)

    Make the Default of the Checkbox

    If(
     vChecked,
     true,
     false
    )

    You will need to reset the Variable onscreen exit (and entrance would be safe as well)

    UpdateContext({vChecked:false});

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • geoUPA Profile Picture
    8 on at

    Sorry @WarrenBelz , set a variable for which control?? This doesn't come naturally to me.

     

    I set the variable (set(oncheck, vchecked) in the oncheck control

    And put the (UpdateContext({vChecked:true});Reset(Checkinbox)) in the barcode onscan control

    And set If(vChecked,true,false) in the checkbox default

     

    Still no dice.

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @geoUPA ,

    As long as the action (OnScan) triggers the variable set (as below) ,this should definitely work - try it with a button and then see what has to trigger it.

    TextBox.pngChcekboxDefault.pngCheckBox.gif

     

     

     

     

     

     

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • geoUPA Profile Picture
    8 on at

    @WarrenBelz 

     

    So it is successfully checking the box onscan, however it is now checking all the boxes. Is this an issue with my updatecontext({vchecked: false})? 

  • geoUPA Profile Picture
    8 on at

    @WarrenBelz 

     

    ezgif.com-video-to-gif (4).gif

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    OK @geoUPA ,

    I did not realize you had these in a gallery and there were multiple. So I assume the barcode is somewhere in the data of the gallery display item?

    I will use the names in blue - BarCodeNo for the field & ScannedCodeNo for the code scanned - change to your actual names.

    In the Reset of the CheckBox,

    If(
     vChecked && ThisItem.BarCodeNo = ScannedCodeNo
     true,
     false
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • geoUPA Profile Picture
    8 on at

    Hi @WarrenBelz 

     

    Unfortunately the checkboxes are still all being ticked. Any other ideas?

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @geoUPA ,

    Yes you cannot reset a control from outside the object, but strangely it works for me with an error showing in design mode. However if you reset the gallery instead of the checkbox, it works as below.

    ResetCheck.gif

     

     

     

     

     

     

     

     

     

     

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard