# Barcode Scanner with Perspective text or numeric fields PC based not mobile

**URL:** <https://forum.inductiveautomation.com/t/barcode-scanner-with-perspective-text-or-numeric-fields-pc-based-not-mobile/44604>\
**Category:** Ignition\
**Created:** [March 17, 2021, 10:14pm UTC](https://forum.inductiveautomation.com/t/barcode-scanner-with-perspective-text-or-numeric-fields-pc-based-not-mobile/44604 "2021-03-17T22:14:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yfactor](https://avatars.discourse-cdn.com/v4/letter/y/e79b87/32.png) [@Yfactor](https://forum.inductiveautomation.com/u/Yfactor)\
**Post date:** [March 17, 2021, 10:14pm UTC](https://forum.inductiveautomation.com/t/barcode-scanner-with-perspective-text-or-numeric-fields-pc-based-not-mobile/44604/1 "2021-03-17T22:14:50Z")

</div>

Hi there, would like to know how we can collect a set of barcodes using a bluetooth barcode scanner continuously. I would like the text box to display the current barcode scanned and when they scan the next it will display the next barcode

the barcode will be collected in an array [] string on the client’s session. Thank you in advance

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [March 18, 2021, 12:37am UTC](https://forum.inductiveautomation.com/t/barcode-scanner-with-perspective-text-or-numeric-fields-pc-based-not-mobile/44604/2 "2021-03-18T00:37:02Z")

</div>

Use the [barcode input component](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Barcode+Scanner+Input) with a prefix/suffix on your scanner.

---

<div class="post-metadata">

**Author:** ![Yfactor](https://avatars.discourse-cdn.com/v4/letter/y/e79b87/32.png) [@Yfactor](https://forum.inductiveautomation.com/u/Yfactor)\
**Post date:** [March 22, 2021, 8:00pm UTC](https://forum.inductiveautomation.com/t/barcode-scanner-with-perspective-text-or-numeric-fields-pc-based-not-mobile/44604/3 "2021-03-22T20:00:34Z")

</div>

Hi ryanjmclaughlin, thank you yes it worked.  
I have a problem, everytime I try to scan a new barcode, it overwrites the first one in data, How can continuously append to the data instead of overwriting it?

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [March 22, 2021, 11:48pm UTC](https://forum.inductiveautomation.com/t/barcode-scanner-with-perspective-text-or-numeric-fields-pc-based-not-mobile/44604/4 "2021-03-22T23:48:08Z")

</div>

The data is an array, the new scans will be appended to the end by default. I use the data in many different ways so I capture the scan and broadcast it via sendMessage, then reset the data back to `[]` after every scan.

---

<div class="post-metadata">

**Author:** ![Yfactor](https://avatars.discourse-cdn.com/v4/letter/y/e79b87/32.png) [@Yfactor](https://forum.inductiveautomation.com/u/Yfactor)\
**Post date:** [March 23, 2021, 2:26am UTC](https://forum.inductiveautomation.com/t/barcode-scanner-with-perspective-text-or-numeric-fields-pc-based-not-mobile/44604/5 "2021-03-23T02:26:46Z")

</div>

Cool thank you. do you know why sometimes it overwrites the existing value and sometimes it will append to data when scanned?

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [March 23, 2021, 5:18pm UTC](https://forum.inductiveautomation.com/t/barcode-scanner-with-perspective-text-or-numeric-fields-pc-based-not-mobile/44604/6 "2021-03-23T17:18:18Z")

</div>

Yes, I never quite figured out the rules around how the data array behaves I have seen inconsistency as well, maybe one of the IA people can chime in.

---

<div class="post-metadata">

**Author:** ![Yfactor](https://avatars.discourse-cdn.com/v4/letter/y/e79b87/32.png) [@Yfactor](https://forum.inductiveautomation.com/u/Yfactor)\
**Post date:** [March 23, 2021, 9:28pm UTC](https://forum.inductiveautomation.com/t/barcode-scanner-with-perspective-text-or-numeric-fields-pc-based-not-mobile/44604/7 "2021-03-23T21:28:57Z")

</div>

Thank you @ryanjmclaughlin for the idea of broadcasting 😉 yes I’ve lodged a ticket and am waiting for reply.
