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

barcode scanner always on

Hi,

 

For my employee check in and out app I use QR codes with the barcode scanner.

But the scanner is activated after employees click on the button.

 

How do I set it that the camera is always on so that after each scan with a patch it first redirects to a success message screen and activates the camera again after x seconds?

 

my onscan code is:

Patch(
aanwezigheidMedewerkers;
LookUp(aanwezigheidMedewerkers;medewerkernumber=BarcodeScanner5.Value);
{
status: If(
LookUp(aanwezigheidMedewerkers;medewerkernumber=BarcodeScanner5.Value).status = true;
false;
true
)
}
)

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @ ejdregmans:

Do you want to turn on the camera automatically without selecting a button?

Do you need to navigate to the successful screen when the scan is successful?

I think using the timer control can achieve the above function.

Ive made a test for your reference:

1\add two screens(barcodescanner screen; successmessage screen)

At barcodescanner screen:

2\add a barcodescanner(BarcodeScanner1) control.

Set its onscan property to:

 

Patch(
aanwezigheidMedewerkers;
LookUp(aanwezigheidMedewerkers;medewerkernumber=BarcodeScanner5.Value);
{
status: If(
LookUp(aanwezigheidMedewerkers;medewerkernumber=BarcodeScanner5.Value).status = true;
false;
true
)
}
);
Navigate(‘successmessage screen’)

 

When the scan is successful, navigate to successmessage screen

3\Set this screens(barcodescanner screen) onvisible property to

 

Select(BarcodeScanner1);

 

When the user navigates to this screen open the camera

At successmessage screen:

4\add a timer control

Set its property

AutoStarttrue

Duration3000  /*means 3s,modify it as you like*/

OnTimerEnd: Navigate(barcodescanner screen)

Reset:true

Visible:false

Wait for 3s then navigate to barcodescanner screen

 

When the user scan barcode in barcode screen, he will navigate to the successmessage screen if the scan is successful. After 3s the user will back to the barcodescanner screen and the camera will automatically turn on.

 

Best Regards,

Bof

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @ejdregmans ,

Have a read of this post - the function I believe is still under review. Also this recent one from @EricLott may be of use.

 

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.

v-bofeng-msft
Community Support
Community Support

Hi @ ejdregmans:

Do you want to turn on the camera automatically without selecting a button?

Do you need to navigate to the successful screen when the scan is successful?

I think using the timer control can achieve the above function.

Ive made a test for your reference:

1\add two screens(barcodescanner screen; successmessage screen)

At barcodescanner screen:

2\add a barcodescanner(BarcodeScanner1) control.

Set its onscan property to:

 

Patch(
aanwezigheidMedewerkers;
LookUp(aanwezigheidMedewerkers;medewerkernumber=BarcodeScanner5.Value);
{
status: If(
LookUp(aanwezigheidMedewerkers;medewerkernumber=BarcodeScanner5.Value).status = true;
false;
true
)
}
);
Navigate(‘successmessage screen’)

 

When the scan is successful, navigate to successmessage screen

3\Set this screens(barcodescanner screen) onvisible property to

 

Select(BarcodeScanner1);

 

When the user navigates to this screen open the camera

At successmessage screen:

4\add a timer control

Set its property

AutoStarttrue

Duration3000  /*means 3s,modify it as you like*/

OnTimerEnd: Navigate(barcodescanner screen)

Reset:true

Visible:false

Wait for 3s then navigate to barcodescanner screen

 

When the user scan barcode in barcode screen, he will navigate to the successmessage screen if the scan is successful. After 3s the user will back to the barcodescanner screen and the camera will automatically turn on.

 

Best Regards,

Bof

View solution in original post

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,707)