# Property change script won't reset value of text field

**URL:** <https://forum.inductiveautomation.com/t/property-change-script-wont-reset-value-of-text-field/77622>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 9, 2023, 12:19pm UTC](https://forum.inductiveautomation.com/t/property-change-script-wont-reset-value-of-text-field/77622 "2023-08-09T12:19:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christy\_Jean](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Christy\_Jean](https://forum.inductiveautomation.com/u/Christy_Jean)\
**Post date:** [August 9, 2023, 12:19pm UTC](https://forum.inductiveautomation.com/t/property-change-script-wont-reset-value-of-text-field/77622/1 "2023-08-09T12:19:34Z")

</div>

I'm trying to use a text field where when someone writes something, it reads the text, clears and stays focused on the text field. I'm using a property change script, but I can't seem to make the text field clear and stay focused

---

<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 9, 2023, 12:25pm UTC](https://forum.inductiveautomation.com/t/property-change-script-wont-reset-value-of-text-field/77622/2 "2023-08-09T12:25:44Z")

</div>

I can't see what's wrong with your code. Or your component configuration.

---

<div class="post-metadata">

**Author:** ![Christy\_Jean](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Christy\_Jean](https://forum.inductiveautomation.com/u/Christy_Jean)\
**Post date:** [August 9, 2023, 12:29pm UTC](https://forum.inductiveautomation.com/t/property-change-script-wont-reset-value-of-text-field/77622/3 "2023-08-09T12:29:42Z")

</div>

this is what I tried so far, but it doesn't work:

```auto
previousValue = ' '
self.props.text = previousValue
self.focus()

```

---

<div class="post-metadata">

**Author:** ![user66](https://avatars.discourse-cdn.com/v4/letter/u/b487fb/32.png) [@user66](https://forum.inductiveautomation.com/u/user66)\
**Post date:** [August 9, 2023, 12:30pm UTC](https://forum.inductiveautomation.com/t/property-change-script-wont-reset-value-of-text-field/77622/4 "2023-08-09T12:30:26Z")

</div>

Is this in Perspective?  
Maybe set **deferUpdates** and **rejectUpdatesWhileFocused** to false in props of the text field

---

<div class="post-metadata">

**Author:** ![Christy\_Jean](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Christy\_Jean](https://forum.inductiveautomation.com/u/Christy_Jean)\
**Post date:** [August 9, 2023, 12:30pm UTC](https://forum.inductiveautomation.com/t/property-change-script-wont-reset-value-of-text-field/77622/5 "2023-08-09T12:30:54Z")

</div>

yes it is perspective
