cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jasperr
New Member

Barcode Scan Data -> Selection on Combo Box

How would I go about inputting data from a Barcode scan onto a combo box (which the scanned data is already in the combo box list)?

I am fairly new to Power Apps, just a side note.
I can send over any information on the app that may be needed.

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @Jasperr ,

Will the scanned value be in the available selections from the combo box ? If not, you will have difficulties displaying it and are better simply using a Text control. If it is in those values, set a Variable on the OnScan of the scanner

UpdateContext({varScan:Self.Value})

and then the Combo Box DefaultSelectedItems (assuming here its output is .Value)

{
   Value:
   If(
      !IsBlank(varScan),
      varScan,
      ThisItem.YourFieldName
   )
}

and at Screen OnVisible and anywhere you save

UpdateContext({varScan:Blank()}

 

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.

Visit my blog Practical Power Apps

This doesn't seem to work.

Jasperr_0-1643203117150.png


However, I managed to get the Combo Box to present the Scanned Barcode Data by placing "[BarScanPartNo.Value]" inside DefaultSelectedItems. Although, I also need "Parent.Default" inside this field or else the data doesn't correctly save to that field. Also when editing a record that already exists, the field result stays empty.




@Jasperr ,

That is why you need the Variable - what does not work (please post code as Text). Also what is the Items of the Combo Box?

WarrenBelz
Super User
Super User

Hi @Jasperr ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Visit my blog Practical Power Apps

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (1,749)