web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Bug with Barcodes? (2D...
Power Apps
Unanswered

Bug with Barcodes? (2D DATA_MATRIX Type)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I'm scanning a GS1 DATAMATRIX type Barcode and encountered a problem/bug. 

 

Variables:
Barcode Scanner - BarcodeScanner

Label - Barcode Scanner Result

 

While using the Label, and populating the text as "BarcodeScanner.Value", it appears correctly. 

Ex. 2D barcode value on the product box, 011234567891123456789. When in the Label, appears as 011234567891123456789

It's a 1:1 match. 

 

However, when I use the function Mid(), it displays, the incorrect values. 

Ex. Mid(BarcodeScanner.Value,3,14) It should show 12345678911234. Instead shows, 11234567891123. 

 

Is there a fix for this? 

 

Thank you, 

 

Categories:
  • KoJaPD Profile Picture
    601 on at

    are you sure there are no (non-printing) spaces? (check the length of the string with Len(yourstring) )

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @KoenJanssensPD 

     

    You're right, there is a blank value in there. 

     

    How do I go about removing it? 
    I try to substitute the null values, and doesn't work =Substitute(BarcodeScanner.Value,Char(0)&Char(9)&Char(10)&Char(12)&Char(13)&Char(32)&Char(127)&Char(173)&Char(160),"") 

    How do I identify the non-printing value from the result of the scan? 

  • KoJaPD Profile Picture
    601 on at

    You can try something like the following code. It uses a regex to keep only numbers:

    Concat(Filter(Split(TextInput1.Text,""),IsMatch(Result,"^[0-9]")),Result)

     

    KoenJanssensPD_0-1626374698859.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard