# Clear all text Fields and dropdown within a view

**URL:** <https://forum.inductiveautomation.com/t/clear-all-text-fields-and-dropdown-within-a-view/93024>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 10, 2024, 4:50pm UTC](https://forum.inductiveautomation.com/t/clear-all-text-fields-and-dropdown-within-a-view/93024 "2024-07-10T16:50:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rfolkes](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rfolkes](https://forum.inductiveautomation.com/u/rfolkes)\
**Post date:** [July 10, 2024, 4:50pm UTC](https://forum.inductiveautomation.com/t/clear-all-text-fields-and-dropdown-within-a-view/93024/1 "2024-07-10T16:50:52Z")

</div>

I have a data entry page with several Dropdown and Text Fields. Is there a simpler way to clear all to "" / null value?  
Can make a button "Clear" and script, but was wondering if there was any other way to do this that doesn't require as much setup / adaptable to changes in page layout

```python
	self.parent.getChild("TabContainer").getChild("General").getChild("Tag Name").getChild("Data").props.text = ''
	self.parent.getChild("TabContainer").getChild("General").getChild("Description").getChild("Data").props.text = ''

```

---

<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:** [July 10, 2024, 5:33pm UTC](https://forum.inductiveautomation.com/t/clear-all-text-fields-and-dropdown-within-a-view/93024/2 "2024-07-10T17:33:05Z")

</div>

Use a view custom property for every entry field's value, bidirectionally bound. Perhaps as a nested object.

Then your script just assigns to `self.view.custom.whatever`, no component retrieval at all. If you use a nested object, then you can use a single assignment with a dictionary of empty values.

```python
self.view.custom.fields = {'tagName': '', 'description': ''}

```

(All of your scripts would use the view custom props, making your entry form component nesting completely free-form--no need to ever fix scripts when you restructure your view.)
