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 Automate / Trying to pull differe...
Power Automate
Answered

Trying to pull different values on a barcode scan depending on if the character limit is 12 or 14 characters long

(0) ShareShare
ReportReport
Posted on by 7

Hello,

 

I am trying to have power apps pull different values from a barcode scan based on if the barcode scan contains 12 or 14 characters.  I tried using a if statement, but I have had no luck.  

 

Is what I am trying to do possible and if so how?

 

Thank you for your help.

Categories:
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @hman125,

    Do you want to extract value from barcode scanner if the barcode contains 12-14 characters?

     

    The barcode scanner is a button that doesn't display the scan result. Consider showing the scan result with a Label control. Set the label's Text property to the barcode scanner's Value property. Set the label's Live property to Polite so that screen-reader users are notified of changes. 

     

    To achieve your need, I think you should set the Visible property of a Label as below to make it only visible when the barcode scan contains 12 or 14 characters:

    Len(BarcodeScanner1.Value)>=12 &&Len(BarcodeScanner1.Value)<=14

    Then only when the barcode contains 12-14 characters, the label will display value.

     

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 130

Last 30 days Overall leaderboard