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 / Convert control .value...
Power Apps
Answered

Convert control .value to string

(0) ShareShare
ReportReport
Posted on by 151

Hi, 

I need to check if in scanned barcode is sign ';'. 

Function Find looks for in string, so how to convert the control value to text.

Find(";"; (Text(ControlName.Barcodes.Value))) - 'Text' function has incorect arguments.
Categories:
I have the same question (0)
  • Rajkumar_M Profile Picture
    3,741 Super User 2025 Season 2 on at

    Hi @knyklu 

     

    Try this formula

     

    Find(";", Text(ControlName.Barcodes.Value))

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • Verified answer
    CarlosFigueira Profile Picture
    on at

    The barcode reader control can read multiple barcodes in a single session, so the Barcodes property is a table, not a string which you can use in the Find function. If you know that you only have one scanned barcode, you can use the First function to retrieve that from the table:

    Find(";"; First(ControlName.Barcodes).Value)

    If you want to retrieve all scanned barcodes with a ';' in it, then you can use something like

    Filter(ControlName.Barcodes; ";" in Value) // this is still a table

    Hope this helps!

  • knyklu Profile Picture
    151 on at

    Where is the difference?

     

     

  • Verified answer
    CarlosFigueira Profile Picture
    on at

    In your code, the call to 

    Text(ControlName.Barcodes.Value)

    is invalid. The Text function can be used to convert scalar values (such as numbers / dates / times) to text/string. But ControlName.Barcodes.Value is not a scalar, it is a table with the values of all barcodes that were scanned by the control - and the Text function does not work with tables, only with scalar values.

    By taking the first element of the ControlName.Barcodes table, we have a single record, and when we use .Value we are extracting the text/string from that record. That value can be used in the Find function to search for ';'.

  • knyklu Profile Picture
    151 on at

    Sorry @CarlosFigueira, the question was for @Rajkumar_404 .

     

    Concerning Your post... As for your post... I'm ashamed to admit it, but I got var First(Laser.Barcodes).Value to get the data from barcode and pass them to next operation, but there I just put scLaser.Barcodes.Value.
    Sorry for problem.

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard