cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JAWL
Helper II
Helper II

One single barcode scanner to populate in multiple text input

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.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@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.

 

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

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.

 

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

 

@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.

 

View solution in original post

@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

 

 

 

Hi @JAWL ,

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

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,132)