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 / One single barcode sca...
Power Apps
Answered

One single barcode scanner to populate in multiple text input

(0) ShareShare
ReportReport
Posted on by 393

Dear All,

 

I have created a simple scanning system:

1. Click the respective scan button

2. Scan barcode

3. Scanned data is populated into text input beside the clicked scan button

JAWL_1-1635052939865.png

 

Need help to create a simpler UX design as per below:

1. Select any text input I want

2. Click scan to scan barcode

3. Populate the scanned data into selected text input

JAWL_2-1635053008801.png

 

Hope to receive some guidance from this community. Thanks in advance.

 

 

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    Hi @JAWL ,

    Set a Variable on the OnSelect of each Text box (example)

    UpdateContext({varScan:"to"})
    

    Then OnScan

    UpdateContext({varCode:Self.Value})

    Then the Default of the Text box

    If(
     varScan = "to",
     varCode
    )

     

    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.

     

  • JAWL Profile Picture
    393 on at

    Hi @WarrenBelz 

     

    I followed your instructions but the scanned data populated in all selected text boxes. Refer to screenshots below:

    1. I select Serial Number text box to scan Barcode 123

    2. But when I select PN text box to scan another barcode, the "123" auto-populated and the "123" disappears in Serial Number text box.

     

    I want the "123" sticks with Serial Number text box and the "123" will not be auto-populated on the next selected text box. Did I miss anything? 

     

    JAWL_1-1635060117000.png

     

    JAWL_0-1635060090804.png

     

  • Verified answer
    WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    @JAWL ,

    I have now gone to the effort of building a model - the problem before was resetting. You need this on the OnSelect of your boxes

    UpdateContext({varScanBox: "TO"})
    UpdateContext({varScanBox: "PN"})
    UpdateContext({varScanBox: "SN"})

    On the Scanner OnScan

    If(
     varScanBox = "TO",
     UpdateContext({varScanTO: Self.Value}),
     varScanBox = "PN",
     UpdateContext({varScanPN: Self.Value}),
     varScanBox = "SN",
     UpdateContext({varScanSN: Self.Value})
    )

    And on the text box Default

    varScanTO
    varScanPN
    varScanSN

     

    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.

     

  • JAWL Profile Picture
    393 on at

    @warren 

     

    I followed your instructions above for the first text box and OnScan. I did for the next text box per below. What should I tweak?

     

    JAWL_0-1635071607786.png

    JAWL_2-1635071763641.png

     

     

     

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    Hi @JAWL ,

    Please see amended post - it was put up shortly before your response.

  • JAWL Profile Picture
    393 on at

    Please accept my big thanks as a beginner!  You save me!

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

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard