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 / Barcode Reader output ...
Power Apps
Answered

Barcode Reader output to text box

(0) ShareShare
ReportReport
Posted on by 453

Hello,

 

I'm trying to use the new Barcode Reader to output the scan to a text box.

 

I have tried following the solution here but i can't get it to work https://powerusers.microsoft.com/t5/Building-Power-Apps/Barcode-Reader-no-output-value-to-text-box/m-p/2092469#M522995

 

If someone could kindly share how I can click scan, then the barcode scanned to appear in the text box.

 

JoshPullan11_0-1683201137888.png

 

Thanks

Categories:
I have the same question (0)
  • AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello, @jap11 , the barcode scanner control has a property called OnScan, use this formula in there: 

    Set(glbVarScan, BarcodeReader1.Barcodes)

    Then your your Label Text property, put the glbVarScan

     

    If my reply helped you, please give a 👍  , & if it solved your issue, please give a 👍 & Accept it as the Solution to help other community members find it more.

    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.

    Visit my Blog: www.powerplatformplace.com

    Visit my YouTube Channel: https://www.youtube.com/@powerplatformplace/videos

     

  • Jap11 Profile Picture
    453 on at

    Hello @AhmedSalih - thanks for responding!

     

    I'm still getting an error message when trying this?

     

    JoshPullan11_1-1683201820121.png

     

    JoshPullan11_0-1683201803165.png

     

    Is there still something I'm doing wrong?

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @jap11, is this a Teams PowerApp?

  • Verified answer
    AhmedSalih Profile Picture
    6,680 Moderator on at

    @jap11, use this in the Text property: First(glbVarScan).Value

  • Jap11 Profile Picture
    453 on at

    @AhmedSalih thank you, that's worked!

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @jap11, Glad it did 🙂

  • Jap11 Profile Picture
    453 on at

    @AhmedSalih  Apologies - one thing I've noticed is that if i scan a barcode and it outputs to the text box, if i leave the screen and return back, the last scanned code still appears.

     

    Is there anyway to reset this so the field is empty again if i leave the screen.

     

    JoshPullan11_0-1683203763363.jpeg

     

     

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @jap11, try to use the Last function instead of the First: Last(glbVarScan).Value

     

  • Jap11 Profile Picture
    453 on at

    @AhmedSalih unfortunately it still displays the last scanned value.

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @jap11 

    , after I gave it a thought, and with the new way yhat barcode control now works, you will need to use collection: In the OnScan: Collect( colScannedItems, {ScannedItem: First(BarcodeReader1.Barcodes).Value, ScannedTime: Now()} )

     

    In the Text: First(SortByColumns(colScannedItems,"ScannedTime",SortOrder.Descending)).ScannedItem

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
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard