cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stapes
Impactful Individual
Impactful Individual

What does Reset(BarcodeScanner) reset it to?

My Barcode Scanner control has the following properties:

Reset: false

OnScan: false

It is linked to a Text Input control named txtQrCode2, with the following property:

 

Default: BarcodeScanner4.

I have added a Cancel Icon to reset this value.

In that Icon's OnSelect property, I have tried numerous approaches, all without success.

Reset(BarcodeScanner) appears to clear the text field, but it is not seen as empty here:

Filter(FinishedGoodsMaster,  (SearchInput_2.Text in stDescLine1) , (SearchInput_2.Text in stCodeParent) ,
(txtQrCode2.Text in stCodeParent))

So when I scan a value, the gallery displays the correct item, but when I Reset the BarcodeScanner control, the Gallery shows nothing. It should show everything - if it was truly empty - which is what happens if I manually delete the value.

1 ACCEPTED SOLUTION

Accepted Solutions
EricLott
Resident Rockstar
Resident Rockstar

Reset(BarcodeScanner) will set BarcodeScanner.Value to Blank(). You can test this by adding this formula to a label

BarcodeScanner.Value = Blank()

Which will return true after you reset the BarcodeScanner control. Try using BarcodeScanner.Value instead of just BarcodeScanner and see if that fixes it. 

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

View solution in original post

2 REPLIES 2
EricLott
Resident Rockstar
Resident Rockstar

Reset(BarcodeScanner) will set BarcodeScanner.Value to Blank(). You can test this by adding this formula to a label

BarcodeScanner.Value = Blank()

Which will return true after you reset the BarcodeScanner control. Try using BarcodeScanner.Value instead of just BarcodeScanner and see if that fixes it. 

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

stapes
Impactful Individual
Impactful Individual

Brilliant. I changed the Default property of my Text Input field to this:

If(IsBlank(BarcodeScanner4.Value),"",BarcodeScanner4.Value)

All now works!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,510)