# Barcode input

**URL:** <https://forum.inductiveautomation.com/t/barcode-input/12306>\
**Category:** Ignition\
**Created:** [October 31, 2016, 2:39pm UTC](https://forum.inductiveautomation.com/t/barcode-input/12306 "2016-10-31T14:39:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![boster281](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@boster281](https://forum.inductiveautomation.com/u/boster281)\
**Post date:** [October 31, 2016, 2:39pm UTC](https://forum.inductiveautomation.com/t/barcode-input/12306/1 "2016-10-31T14:39:41Z")

</div>

I have a interface that when the operator scans the internal ID barcode an sql query runs in the background for part id and part serial number from table x. I have a timer that runs every half a second and if the serial and part number have a length greater than 4 it updates table y.  
This works but i will get duplicates some times and it seems a bit clunky.  
The reason that i did it this way was so the operator can scan 5 to 20 parts quickly and add them to a batch in a table.  
If there is any ideas on how to streamline this or any resources that you can direct me to that I might be able to find an answer it would be appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [October 31, 2016, 3:53pm UTC](https://forum.inductiveautomation.com/t/barcode-input/12306/2 "2016-10-31T15:53:27Z")

</div>

I would have it scan to a tag and then use the Tag Change script on the tag to do the logic and upload.  
That way it will only happen if the value of the tag changes when you scan.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 31, 2016, 3:56pm UTC](https://forum.inductiveautomation.com/t/barcode-input/12306/3 "2016-10-31T15:56:19Z")

</div>

If you’re using text fields for the actual input, take advantage of the ‘Defer Updates’ property - use a propertyChanged event script, monitoring the ‘text’ property - but with defer updates checked the script will only run when the text entry is ‘confirmed’ by the barcode scanner sending ENTER to move to the next text field.
