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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps Barcode Sca...
Power Apps
Unanswered

Power Apps Barcode Scanner - set length validation?

(0) ShareShare
ReportReport
Posted on by 5

Hi everyone, 

 

I build a Power App from a Share Point List, I have 3 columns that can be scanned, so in the Share Point List I add data validation for the length of the code, but seem that in the Power App when I add the Barcode Scanner the data validation doesn't work properly... in other words, I set a limit of 4 digit in Share Point List (Barcode code is a 4 digit code) , and what the Barcode Scanner is doing is that if I scan a 10 digit code, it's populating just the fist 4 digit of the 10, but I don't want him to cut the length and scan just 4 digit, I want to give a error if length is not proper (wrong code is scanned). Any idea if this is possible?  

 

Any help is really appreciated.

Many thanks, 

Emanuel

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @Emanuel_Orzan1 ,

    It is doing exactly as it is designed - if you want to stop anything more than 4 characters being scanned, put this on the OnScan

    If(
     Len(Self.Value)>4,
     Notify("Only 4 characters allowed",Error);
     Reset(Self),
     . . . YourPresentCodeHere
    )

     

    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.

  • Emanuel_Orzan1 Profile Picture
    5 on at

    Thank you very much, it work perfect! 🍻

  • BMWPilot Profile Picture
    5 on at

    @WarrenBelz 
    I am trying to do this as well, just looking for an exact number of characters. Whenever I am putting in the "Len(self.value)..." I get the 'value' is unacceptable. I also tried to do the "Len(BarcodeReader1.Barcodes)... and still get the "Invalid schema". Any help would be appreciated.

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @BMWPilot ,

    This is a different (new) control to the one in the earlier post - you should need

    Len(First(BarcodeReader1.Barcodes).Value)

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard