cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mikearmour
Level: Powered On

Barcode and Text Control Not Resetting When Navigating Off Screen

Hey All - I need some of your expert assistance.

 

Sorry for not embedding the images referenced below but for some reason I was getting errors trying to do so.

 

We have a barcode scanner built into two different apps.

(See attached Step 1 Image)

 

When we scan a barcode - the result will populate a text filed.

The user then presses a button that perfoms data functions and navigates to another screen.

(See attached Step 2 Image)

 

Up until yesterday - both the barcode and the associated text field would reset (blank out) when the user navigated back to the barcode scan field. Now - we get an error that the camera isn't setup and the previously populated data is still present.

(See attached Step 3 Image)

 

The only way to get these fileds to reset right now is to exit the app - which is unaccepatable when trying to do an asset inventory.

 

Questions:

  1. Does anyone know if any recent changes to PowerApp functionality caused this?
  2. Does anyone know a way to fix this? Is there some property I can set either OnSelect (navigate away from screen) OnHidden (navigate away from screen) or OnVisible (navigate to screen) that reset the barcode and related text field?
  3. What does each of the properties on the Barcode control do? Specifically the Camera property. I cannot find documentation online about the properties other than BarcodeType and ScanRate. (All the other properties like DisplayMode, Border, Visibile, etc are fully documnted for other properties).
  4. Is anyone else having this issue?

I have verfied that we are all running the latest version of the mobile app (iOS and Android).

 

6 REPLIES 6
Palak
Level: Powered On

Re: Barcode and Text Control Not Resetting When Navigating Off Screen

Two workarounds:

 

1. Change the display mode of Barcode control to 'Disabled' and then back to 'Edit'. This way it will reset the control.

2. As per this therad, turn on 'Render in Classic mode' from File->App Settings->Advanced settings.

Community Support Team
Community Support Team

Re: Barcode and Text Control Not Resetting When Navigating Off Screen

Hi @mikearmour,

 

Thanks for your feedback, the user @Palak has faced same issue with you and the Support Engineer 

 

 

 

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mikearmour
Level: Powered On

Re: Barcode and Text Control Not Resetting When Navigating Off Screen

@Palak - Thank you.

 

I was successful in getting option 2 to work across all the apps we are developing/using that incorporate the barcode scanner control.

 

However, I could not successfully get option 1 to work. I tried the following:

  1. Setting the OnVisible and OnHidden parameters for the screen with the barcode control to:
    1. OnVisible: BarcodeControl.DisplayMode.Edit
    2. OnHidden: BarcodeControl.DisplayMode.Disabled
    3. The DisplayMode parameter of BarcodeControl was left at Edit
  2. I tried setting a variable (v_BarcodeFunction) to:
    1. OnVisible: Set (v_BarcodeFunction, "Edit") [Note: I tried "edit" also]
    2. OnHidden: Set (v_BarcodeFuntion, "Disabled") [Note: I tired "disabled" also]
    3. The DisplayMode parameter of BarcodeControl was set to v_BarcodeFunction)
  3. I tried setting a variable (v_BarcodeFunction) to:
    1. OnVisible: Set (v_BarcodeFunction, "DisplayMode.Edit")
    2. OnHidden: Set (v_BarcodeFuntion, "DisplayMode.Disabled")
    3. The DisplayMode parameter of BarcodeControl was set to v_BarcodeFunction)
  4. I tired similar to above setting the DisplayMode paramter and v_BarcodeFunction variable from the button that navigate to the screen with the barcode reader (DisplayMode.Edit) and navigate away from the screen with the barcode reader (DisplayMode.Disabled).

Any guidance on setting this paramer successfully to enable and disable the barcode reader would be helpful.  I am afraid that some subsequent update to PowerApps will make the classic mode functionality disappear,

mikearmour
Level: Powered On

Re: Barcode and Text Control Not Resetting When Navigating Off Screen

@v-xida-msft & @Palak - Thank you.  I replied to @Palak comment with what worked and what didn't.

 

I still need an answer to bullet 3 of my original post:

What does each of the properties on the Barcode control do? Specifically the Camera property. I cannot find documentation online about the properties other than BarcodeType and ScanRate. (All the other properties like DisplayMode, Border, Visibile, etc are fully documnted for other properties).

Palak
Level: Powered On

Re: Barcode and Text Control Not Resetting When Navigating Off Screen

Regarding bullet point 3, here is a page that give more details about barcode control properties. But this page was published back in 2016 and it looks like a few properties have been removed since then (Please, can somebody update this page).

 

The Camera properties basically allows you to select Main/back camera (0) or the front facing/selfie camera (1) for mobiles and tablets.

 

Hope this helps.

Palak
Level: Powered On

Re: Barcode and Text Control Not Resetting When Navigating Off Screen

Try setting the DisplayMode propety of Barcode controle using a variable.

 

For e.g.

 

If(IsBlank(CustomerNumber),Edit,Disabled)

 

In above example, whenever CustomerNumber value becomes blank, the DisplayMode of barcode controle will change to Edit and the text property will automatically get reset.

 

This works for me. Hope this works for you too.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,027)