cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Barcode Scanned Result To be Show in Next Screen

Hi, I read many tutorials on Barcode Scanner, I realised the scan button is same screen with a result gallery.

I would like to have a scan barcode icon in several screens.

1. Click the barcode scanner icon.

2. Scan the barcode.

3. A new screen should show the details of the code scanned.

 

I set the barcode scanner icon OnScan property=UpdateContext the scanned value to a variable ; Navigate to the ResultScreen(I use Form and Gallery to display the details for the code scanned)

However, the ResultScreen show blank for the first scanning. 

The result show if I do scanning again.

 

Appreciate if can advise me where I did wrongly.

 

Thank you so much!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Barcode Scanned Result To be Show in Next Screen

Hi @Anonymous ,

 

Context variables are scoped to a screen, which means that you can't build a formula that refers to a context variable on another screen.

Please use the Set function instead to work with global variables that are available throughout your app.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Barcode Scanned Result To be Show in Next Screen

Dear Mona @v-monli-msft  ,

 

Thanks for your reply!

The scan icon OnScan property, I changed to Set(VariableName,BarcodeScanner.Value).

In the Result Screen, all VariableName changed to [@VariableName] then it works!

Now, I understand why it failed when I was using Set() previously. It's because of I didn't write the variable name as [@VariableName] !

Thank you so much!

View solution in original post

4 REPLIES 4
Highlighted
Anonymous
Not applicable

Re: Barcode Scanned Result To be Show in Next Screen

Anyone happened to have Scan button and Result Gallery in different screen?

After tested, the Result Gallery shown result only if I click the scan button from the Result Gallery screen.

The Result Gallery is not updated with the latest scanned barcode if I click the scan button from the other screen.

Highlighted
Community Support
Community Support

Re: Barcode Scanned Result To be Show in Next Screen

Hi @Anonymous ,

 

Context variables are scoped to a screen, which means that you can't build a formula that refers to a context variable on another screen.

Please use the Set function instead to work with global variables that are available throughout your app.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Barcode Scanned Result To be Show in Next Screen

 
Highlighted
Anonymous
Not applicable

Re: Barcode Scanned Result To be Show in Next Screen

Dear Mona @v-monli-msft  ,

 

Thanks for your reply!

The scan icon OnScan property, I changed to Set(VariableName,BarcodeScanner.Value).

In the Result Screen, all VariableName changed to [@VariableName] then it works!

Now, I understand why it failed when I was using Set() previously. It's because of I didn't write the variable name as [@VariableName] !

Thank you so much!

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,587)