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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,737)