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

Barcode Scan Overwrites existing Value always?

Hi,

 

I have an edit form linked to a set of excel tables.

Upon a new entry I want to set one value of a row via a barcode scan. For this I added a barcode scanner doing the following:

OnScan = Set(scanValue, Barcodescanner2.Value)

And the DataCardValue has:

Default = scanValue

 

For new entries this work.

However if I want to edit this entry it either displays an empty field or uses the "scanValue" from a previous scan.

 

The goal is to display the value in the excel sheet, however it should be possible to change it with a new scan.

 

Is this possible and if so how?

 

Kind regards

Lennsart

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @Lennsart ,

Make the Default of the control (replace with your field name)

If(
   !IsBlank(scanValue),
   scanValue,
   ThisItem.YourScanCodeFieldName
)

then (importantly) at Screen OnVisible put

Set(scanValue,Blank())

 

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.

View solution in original post

1 REPLY 1
WarrenBelz
Super User III
Super User III

Hi @Lennsart ,

Make the Default of the control (replace with your field name)

If(
   !IsBlank(scanValue),
   scanValue,
   ThisItem.YourScanCodeFieldName
)

then (importantly) at Screen OnVisible put

Set(scanValue,Blank())

 

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.

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (42,187)