# 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:** 18

<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:** [22 March 2020 15:10 UTC](https://discourse.nodered.org/t/ui-table-how-to-use-commands-to-add-update-table-content-dynamically/23240/18 "2020-03-22T15:10:44Z")

</div>

Is I said, this is part of a bigger flow You can find everything 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…

the key node (actually it is a subflow) for you is `ui-table handler´ placed in fornt of ui-table:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/5/c5d3f280a3a101e309dea62fbd9313f330cf5b2e.png)

I took the afford to write some docs in the info panlel: More docs on my github repro

- Replace the `in node` with your data source
- the messges must have a topic and a row property in this case ´state´  
example:  
`msg={"topic":1,state={"col1":1,"col2":5,"col3":3.23}`  
where topic is the index (sting or number)
- one column must be a unique index field. This gives you the ability to update rows instead. if a value in the index column is new a new row will be added, is it is existing this row is updated. Define the index field in the tabulator json too.
- define the tabulator json as you need. There are many callbacks defined. It is not convenient to edit them in the json editor. So copy paste them in a function node and past them back. But you can leave them in they should not do any harm. The tabulator json gives a lot of different formatted columns definitions ... you will perhaps find what you need.
- the copy paste example in ui-table gives you a good start how to use callbacks (as there is only one and a function node explaining how to do this)

_As I said before, not suitable for beginners but "willing to learn" triggers "willing to help" @ my side. I always want more than I'm capable but grow with the challange._

---

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