# Clearing table contents from a script

**URL:** <https://forum.inductiveautomation.com/t/clearing-table-contents-from-a-script/5821>\
**Category:** Ignition\
**Created:** [February 7, 2013, 2:24pm UTC](https://forum.inductiveautomation.com/t/clearing-table-contents-from-a-script/5821 "2013-02-07T14:24:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mluedecke](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mluedecke](https://forum.inductiveautomation.com/u/mluedecke)\
**Post date:** [February 7, 2013, 2:24pm UTC](https://forum.inductiveautomation.com/t/clearing-table-contents-from-a-script/5821/1 "2013-02-07T14:24:36Z")

</div>

Is there a quick and easy way to clear out the contents of a Table via a script that does not include using the deleteRow command for every row in the table?

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [February 7, 2013, 4:18pm UTC](https://forum.inductiveautomation.com/t/clearing-table-contents-from-a-script/5821/2 "2013-02-07T16:18:54Z")

</div>

Absolutely. This little script does it:

dataset = system.dataset.toDataSet([],[[]])  
event.source.parent.getComponent(‘Table’).data = dataset
