cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nils_PowerApps
Frequent Visitor

Bind barcode scanner to custom label

Good day,

 

I have a fairly simple question, I suppose 😉

I´d like to make use of the default barcode scanner. So far I´ve been able to get the scanned data and work with it - that was easy enough! I´d however like to get rid of the "default button" and bind the launch of the scanner to the label in the lower right hand corner ("Auftrag manuell scannen").

 

Screen of my appScreen of my app

I guess this is very easily done - I tried to do it by using "OnClick" on the label, along with following command:

 

 

Set(Var_Scan;BarcodeScanner1.Value)

 

 

That however does not open the scanner, therefore the function is pointless 😕 I´d need some sort of command to tell the device, that it is supposed to launch the default barcode scanner, whenever the label is clicked.

 

As always, any input is very much welcome - I am still learning a lot 🙂

 

Greetings,

 

Nils

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Nils_PowerApps ,

I have tested this on a mobile device and it works. On the OnSelect of your icon, put 

Select(BarCodeScanner1)

 

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.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @Nils_PowerApps ,

I have tested this on a mobile device and it works. On the OnSelect of your icon, put 

Select(BarCodeScanner1)

 

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.

View solution in original post

Easy enough - thank you very much @WarrenBelz 

 

However, I did not think of this at the time of my initial question, this of course causes a further problem: In order to call "BarCodeScanner1" I do need to have that default blue button somewhere.

 

My goal ultimately was to get rid of the default button all-together and replace it with my custom "Auftrag manuell scannen" label, all while keeping the logic and function behind the default barcode scanner.

 

Is that even possible, or would I need to suggest that as a feature with Microsoft?

 

Greetings

 

Nils

If I am understanding what you are trying to do... 

Add a rectangle on top of what you don't want displayed using the same color as the background.

Nils_PowerApps
Frequent Visitor

@ArtK 

 

Thank you - I just figured it our myself and simply restyled the default button and voila - I am happy 🙂 Sometimes its very easy indeed.

 

Also added an OnSelect to the Icon and used @WarrenBelz function to call the scanner - now it works as intended 🙂

 

ezgif.com-gif-maker.gif

 

Thank you very much to the both of you for bearing with my beginner questions, much appreciated!

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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