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 III
Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

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