# Table Clear not working with Navigation Event

**URL:** <https://forum.inductiveautomation.com/t/table-clear-not-working-with-navigation-event/77954>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [August 16, 2023, 6:59pm UTC](https://forum.inductiveautomation.com/t/table-clear-not-working-with-navigation-event/77954 "2023-08-16T18:59:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJ\_Waizmann](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@AJ\_Waizmann](https://forum.inductiveautomation.com/u/AJ_Waizmann)\
**Post date:** [August 16, 2023, 6:59pm UTC](https://forum.inductiveautomation.com/t/table-clear-not-working-with-navigation-event/77954/1 "2023-08-16T18:59:57Z")

</div>

There is a scenario that I am trying to handle, in which a button within a header is pressed, which clears a table on the main page the header is on. It does this by writing an empty dataset to the tag location the table is bound to. When this secondary view is then being navigated to, clicking anywhere should return the user to the main view with the table now empty, however the table is never cleared when the main view comes back up. The table clear does work, though, when the secondary view navigation is not included in the event sequence. Any thoughts on what could be happening, or how to fix?

---

<div class="post-metadata">

**Author:** ![Tyler\_Shoemake](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tyler_shoemake/32/55661_2.png) [@Tyler\_Shoemake](https://forum.inductiveautomation.com/u/Tyler_Shoemake)\
**Post date:** [August 16, 2023, 8:03pm UTC](https://forum.inductiveautomation.com/t/table-clear-not-working-with-navigation-event/77954/2 "2023-08-16T20:03:17Z")

</div>

Could you share the script? This would help in determining what the issue is.

---

<div class="post-metadata">

**Author:** ![AJ\_Waizmann](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@AJ\_Waizmann](https://forum.inductiveautomation.com/u/AJ_Waizmann)\
**Post date:** [August 17, 2023, 12:02pm UTC](https://forum.inductiveautomation.com/t/table-clear-not-working-with-navigation-event/77954/3 "2023-08-17T12:02:57Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/6/46ee834acfc879098cba20a2834ade01364a89f7.png)

---

<div class="post-metadata">

**Author:** ![Tyler\_Shoemake](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tyler_shoemake/32/55661_2.png) [@Tyler\_Shoemake](https://forum.inductiveautomation.com/u/Tyler_Shoemake)\
**Post date:** [August 23, 2023, 8:08pm UTC](https://forum.inductiveautomation.com/t/table-clear-not-working-with-navigation-event/77954/4 "2023-08-23T20:08:25Z")

</div>

So this must be the script to clear the table data. What about how the table you are trying to clear? I am assuming you have it bound to the dataset tag?

---

<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 23, 2023, 8:42pm UTC](https://forum.inductiveautomation.com/t/table-clear-not-working-with-navigation-event/77954/5 "2023-08-23T20:42:18Z")

</div>

Actions run in parallel. The navigation, happening in the browser, is loading the other view before the script even gets started (scripts run in the gateway).

Use a single script action. Clear the table's tag first. Then trigger the navigation **in the script**.
