# Text Box Clear Issue

**URL:** <https://forum.inductiveautomation.com/t/text-box-clear-issue/7676>\
**Category:** Ignition\
**Created:** [December 6, 2013, 6:59pm UTC](https://forum.inductiveautomation.com/t/text-box-clear-issue/7676 "2013-12-06T18:59:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [December 6, 2013, 6:59pm UTC](https://forum.inductiveautomation.com/t/text-box-clear-issue/7676/1 "2013-12-06T18:59:54Z")

</div>

Since upgrading to 7.6.4 I have noticed a problem with trying to clear a text box.

I have a screen that looks at the property change event of a text box with defer update disabled. when the text box reaches 5 characters in length the text box clears itself. after the upgrade the text box no longer will clear.

For curiosity I also setup two other scenarios. rather than the text box clearing itself i made a button and when the length of the text in the text box is reached it clicks the button. This does not work either, but if i click the button manually it works. the third scenario is the same as the second except I click the button inside a invoke later function.

any ideas why the text box is no longer clearing? attached is a window with the three scenarios.

Thank you,

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [December 11, 2013, 6:31pm UTC](https://forum.inductiveautomation.com/t/text-box-clear-issue/7676/2 "2013-12-11T18:31:30Z")

</div>

I called into tech support. On the text box there is a property called “Reject Updates During Edit”. Either this property was not there or was not working correctly before I upgraded to 7.6.4. Once we set the property to false the text box will now clear itself.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 11, 2013, 6:43pm UTC](https://forum.inductiveautomation.com/t/text-box-clear-issue/7676/3 "2013-12-11T18:43:55Z")

</div>

Thanks for coming back to update this thread.

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [August 14, 2020, 6:30pm UTC](https://forum.inductiveautomation.com/t/text-box-clear-issue/7676/4 "2020-08-14T18:30:11Z")

</div>

In version 8.0.7 the Text Field component property ‘Reject Updates During Edit’ has a scrollover caption that says "If True, this field will not accept updates from external sources (like DB bindings) while the user is editing the field. I found that while True it won’t accept updates from itself either (which I don’t think is an external source). I have the following code on the components property change event. Notice the comment detailing which line won’t work.

```
serial = event.source.text

if event.propertyName == 'text':
	eventLength = len(serial)
	if eventLength < 8:
		pass
	elif eventLength > 8:
		event.source.text = '' #THIS LINE WON'T EXECUTE IF PROPERTY MARKED TRUE
    else:
		system.gui.getParentWindow(event).getComponentForPath('Root Container.txt_Model').requestFocusInWindow()
elif event.propertyName == 'enabled':
	system.gui.getParentWindow(event).getComponentForPath('Root Container.txt_Model').requestFocusInWindow()
```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 14, 2020, 7:18pm UTC](https://forum.inductiveautomation.com/t/text-box-clear-issue/7676/5 "2020-08-14T19:18:05Z")

</div>

Scripts are very much an external source. External to the operator keyboard/mouse.

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [August 14, 2020, 7:26pm UTC](https://forum.inductiveautomation.com/t/text-box-clear-issue/7676/6 "2020-08-14T19:26:52Z")

</div>

I learn something new everyday. I always assumed if I right click on the component that I was still “internal” to the component. I didn’t realize I was going external.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 14, 2020, 9:21pm UTC](https://forum.inductiveautomation.com/t/text-box-clear-issue/7676/7 "2020-08-14T21:21:26Z")

</div>

Snark aside, the component has no clue that the script trying to write to it was triggered by an operator right-click.
