# UI-Table: how to use commands to add / update table content dynamically

**URL:** <https://discourse.nodered.org/t/ui-table-how-to-use-commands-to-add-update-table-content-dynamically/23240>\
**Category:** Dashboard\
**Created:** [17 March 2020 18:03 UTC](https://discourse.nodered.org/t/ui-table-how-to-use-commands-to-add-update-table-content-dynamically/23240 "2020-03-17T18:03:25Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)\
**Post date:** [19 March 2020 16:44 UTC](https://discourse.nodered.org/t/ui-table-how-to-use-commands-to-add-update-table-content-dynamically/23240/13 "2020-03-19T16:44:44Z")

</div>

OK I looked into it. This problem is more general for more complex widgets (witches which not only display a single value as text or gauge)

If a widget is not on the actual tab the dashboard stores the last message to replay it as soon the widget gets visible again. because the widget does not exists on the client side when you are on a different tab and click on the button this fails.

But this "simple" general purpose approach is not working for more complex widgets like ui-table with commands. They will simply never reach the table.

That's why my flow design has always a "helper" node in fornt of the table. Processing all updates and replays the complete table when the tab connects or a new client logs in.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/141f871f79de2acef0499fb47b24b451877121dd.png)  
you see the data comes in from the in node passes through the helper node and then to the table. Se

Example uses a simpler method:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/6/b6d0aaec5be2e13f769719f6cc9aa8a6a11f90a2.png)  
Data goes into the table first and to the recorder node on the output. which then restores the table when ui-control triggers. But when the table widget does not extist nothing is passed and nothing will be recorded.

You can find the ui\_table handler (subflow) here:

> [@\[Announce\] remote device table (and collaboration wanted)](https://discourse.nodered.org/t/announce-remote-device-table-and-collaboration-wanted/22505):
>
> Hello after a lot of work (perhaps too much work) I like to share my first beta version of a flow to display the status of remote devices on the dashboard. It is always good to have an eye on your sensors and actuators especially when they are connected wireless or battery powered. The flow first developed around my homie-convention-node but soon I decided to make it more versatile because I have devices around the house which not support the homie convention. [teaser] Currently supported are…

It is quite universal and I use it for several table with completely different purpose, look and feel.  
It even can handle table edits, layout changes, hiding and revealing columns and in a new version I add row sorting. The documentation of the helper node is a little bit old but covers the basics.

Sorry no easy fix.

---

_[View the full topic](https://discourse.nodered.org/t/ui-table-how-to-use-commands-to-add-update-table-content-dynamically/23240)._
