# Perspective BarcodeScannerInput reset Data Buffer after read

**URL:** <https://forum.inductiveautomation.com/t/perspective-barcodescannerinput-reset-data-buffer-after-read/58746>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [April 22, 2022, 2:49pm UTC](https://forum.inductiveautomation.com/t/perspective-barcodescannerinput-reset-data-buffer-after-read/58746 "2022-04-22T14:49:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tecnoeletronic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tecnoeletronic/32/50975_2.png) [@tecnoeletronic](https://forum.inductiveautomation.com/u/tecnoeletronic)\
**Post date:** [April 22, 2022, 2:49pm UTC](https://forum.inductiveautomation.com/t/perspective-barcodescannerinput-reset-data-buffer-after-read/58746/1 "2022-04-22T14:49:09Z")

</div>

Hi,

i’m using the BarcodeScannerInput control and it works well. I would like to know if there is a way to keep only last item read in “data” array of control. At the moment every time i read a new barcode the control add the new item to the array (and show all data read on control).

thanks

---

<div class="post-metadata">

**Author:** ![tecnoeletronic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tecnoeletronic/32/50975_2.png) [@tecnoeletronic](https://forum.inductiveautomation.com/u/tecnoeletronic)\
**Post date:** [April 22, 2022, 3:01pm UTC](https://forum.inductiveautomation.com/t/perspective-barcodescannerinput-reset-data-buffer-after-read/58746/2 "2022-04-22T15:01:49Z")

</div>

Ok, i solve myself using script on “data”

```auto
	self.custom.lastValue = self.props.data[-1]
	self.props.data = [self.custom.lastValue]

```
