# Callback as json argument

**URL:** https://discourse.nodered.org/t/callback-as-json-argument/24529
**Category:** General
**Created:** [9 April 2020 14:30 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529 "2020-04-09T14:30:52Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![frankzappa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frankzappa/32/19648_2.png) [@frankzappa](https://discourse.nodered.org/u/frankzappa)
#### Post date: [9 April 2020 14:30 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/1 "2020-04-09T14:30:52Z")

</div>

Hi dear community!!!  
I've thank this was right topic...  
I've got one (in fact a lot...) big trouble.  
I want to put a callback as the argument of the "legend" property, as you could see, but the json editor says error:

..........  
{  
"title": "Progress",  
"field": "Progress",  
"width": 100,  
"headerSort": false,  
"formatter": "progress",  
"formatterParams": {  
"color": "Olive",  
"legend": function(v){return v},  
"legendColor": "#000000"  
},  
"sorter": "number"  
},  
..........

I've tried to put the quotation marks, but the table (ui e-table node) recognizes it as a string.  
Thanks in advance.  
Bye.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [9 April 2020 14:53 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/2 "2020-04-09T14:53:41Z")

</div>

Hi @frankzappa

You cannot have a Function in a JSON document - they aren't a type that JSON supports.

You would have to use a Function node to create the object in javascript

---

<div class="post-metadata">

### Author: ![frankzappa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frankzappa/32/19648_2.png) [@frankzappa](https://discourse.nodered.org/u/frankzappa)
#### Post date: [9 April 2020 15:59 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/3 "2020-04-09T15:59:58Z")

</div>

Thanks at first.  
I've seen that in a js document "function()" changes color to blue.  
But now the trouble is getting bigger...  
I'm trying to pass to the ui-e-table node the file in this way:  
msg.payload = [{title: "a", field: "a"},{title: "b", field: "b"}]  
but the ui-e-table node hasn't got the msg type of data.  
I've tried also flow.set() in my function with flow.get() in the ui-e-table, but nothing...  
Please help me.....

---

<div class="post-metadata">

### Author: ![frankzappa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frankzappa/32/19648_2.png) [@frankzappa](https://discourse.nodered.org/u/frankzappa)
#### Post date: [11 April 2020 08:41 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/4 "2020-04-11T08:41:04Z")

</div>

I've found it!!  
I was seeing the ui-e-table, but finally i've found the examples of the ui-table, and then it works.  
Only one question:  
If i put, for example "headerVisible":false(or "height": "30%", all these as arguments of "tabulator"), the header does not do his work; and this behaviour i've found also in the examples downloaded from github.  
Why?

---

<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: [11 April 2020 09:03 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/5 "2020-04-11T09:03:23Z")

</div>

Hi,  
Perhaps I can help with the ui-table things. Everything what is supported by tabulator as arguments could be passed by ui\_control. Perhaps you can post your json to take a look (please use the code format tool).

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/2/7288677ac0616e5876df59ba8d18699ff682ae3d.jpeg)

---

<div class="post-metadata">

### Author: ![frankzappa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frankzappa/32/19648_2.png) [@frankzappa](https://discourse.nodered.org/u/frankzappa)
#### Post date: [11 April 2020 09:17 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/6 "2020-04-11T09:17:38Z")

</div>

First of all, thanks!!  
Then... It's quicker that you try to implement the "headerVisible":false over the example n.3 in github( 3 ui\_control table.json), I wasn't able...

---

<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: [11 April 2020 09:38 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/7 "2020-04-11T09:38:13Z")

</div>

I will but I don’t have access to my computer right now

---

<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: [11 April 2020 15:53 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/8 "2020-04-11T15:53:50Z")

</div>

> [@frankzappa](#):
>
> "headerVisible":false

Workring for here ...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/1/a11981cd9c1ddf807c6c54093fc76b8d82e9a7e0.png)

Perhaps reload the page (the ui-contol node has to kick in)

(without headerVisible):

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

---

<div class="post-metadata">

### Author: ![frankzappa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frankzappa/32/19648_2.png) [@frankzappa](https://discourse.nodered.org/u/frankzappa)
#### Post date: [11 April 2020 16:18 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/9 "2020-04-11T16:18:11Z")

</div>

It's not working for me.  
Could I see your flow?

---

<div class="post-metadata">

### Author: ![frankzappa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frankzappa/32/19648_2.png) [@frankzappa](https://discourse.nodered.org/u/frankzappa)
#### Post date: [11 April 2020 17:44 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/10 "2020-04-11T17:44:02Z")

</div>

By the way, I think it's now quicker if I attach the flow...  
This one is the exmple in which I've added the "headerVisible" propriety: it does not work for me.

[ex3.json](https://discourse.nodered.org/uploads/short-url/e9VgnYxqIHaVZNy6VeEI2gERAcG.json) (4.4 KB)

---

<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: [11 April 2020 18:23 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/11 "2020-04-11T18:23:02Z")

</div>

> [@frankzappa](#):
>
> Could I see your flow?

I took the ui-table example and modified it with `"headerVisible": false`

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/1/81ea4924188a081a13e32da99fcb9bfd1658006e.png)

and I get this:

 ![sWFidy3Lc0](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/e/be70bc79ec26e67395da320cbc506b0fac980bef.gif)

I added your change node with mine (set to true) and I can switch the header on/off with the inject nodes  
And I updated to the latest version of the dashboard and ui-table (Node-RED 1.0.3) just to be shure.

```auto
[{"id":"47813b5f.afda84","type":"inject","z":"ab797823.3396a8","name":"","topic":"","payload":"[{\"name\":\"MEQ0451495\",\"room\":\"Bathroom\",\"SET_TEMPERATURE-value\":22,\"ACTUAL_TEMPERATURE-value\":21.8,\"VALVE_STATE-value\":90,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":true,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875547\",\"room\":\"Living Room\",\"SET_TEMPERATURE-value\":12,\"ACTUAL_TEMPERATURE-value\":16.2,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":1},{\"name\":\"MEQ1875538\",\"room\":\"Living Room\",\"SET_TEMPERATURE-value\":18,\"ACTUAL_TEMPERATURE-value\":19.5,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.6,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":2},{\"name\":\"MEQ0447462\",\"room\":\"Kitchen\",\"SET_TEMPERATURE-value\":17,\"ACTUAL_TEMPERATURE-value\":22.2,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":10,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":3},{\"name\":\"MEQ1875551\",\"room\":\"Office\",\"SET_TEMPERATURE-value\":18,\"ACTUAL_TEMPERATURE-value\":20.2,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ0447425\",\"room\":\"Dining Room\",\"SET_TEMPERATURE-value\":19,\"ACTUAL_TEMPERATURE-value\":20.4,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875546\",\"room\":\"Dining Room\",\"SET_TEMPERATURE-value\":20,\"ACTUAL_TEMPERATURE-value\":18.8,\"VALVE_STATE-value\":99,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ0447483\",\"room\":\"Bedroom\",\"SET_TEMPERATURE-value\":17,\"ACTUAL_TEMPERATURE-value\":22.4,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875541\",\"room\":\"Child\",\"SET_TEMPERATURE-value\":18,\"ACTUAL_TEMPERATURE-value\":20.4,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875552\",\"room\":\"Guest Room\",\"SET_TEMPERATURE-value\":20,\"ACTUAL_TEMPERATURE-value\":21.1,\"VALVE_STATE-value\":9,\"BATTERY_STATE-value\":2.8,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0}]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":509,"y":306,"wires":[["15f66c3e.67e504"]]},{"id":"15f66c3e.67e504","type":"change","z":"ab797823.3396a8","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"headerVisible\":true,\"columnResized\":\"function(column){ var newColumn = { field: column._column.field, visible: column._column.visible, width: column._column.width, widthFixed: column._column.widthFixed, widthStyled: column._column.widthStyled }; this.send({topic:this.config.topic,ui_control:{callback:'columnResized',columnWidths:newColumn}}); }\",\"columnMoved\":\"function(column, columns){ var newColumns=[]; columns.forEach(function (column) { newColumns.push({'field': column._column.field}); }); this.send({topic:this.config.topic,ui_control:{callback:'columnMoved',columns:newColumns}}); }\",\"groupHeader\":\"function (value, count, data, group) {return value + \\\"<span style='color:#d00; margin-left:10px;'>(\\\" + count + \\\" Termostat\\\"+((count>1) ? \\\"e\\\" : \\\"\\\") + \\\")</span>\\\";}\",\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"ROom\",\"field\":\"room\",\"width\":100,\"frozen\":true},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Device\",\"field\":\"name\",\"width\":100,\"align\":\"center\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Type\",\"field\":\"deviceType\",\"width\":100,\"align\":\"center\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Measurements\",\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"target\",\"field\":\"SET_TEMPERATURE-value\",\"formatter\":\"function(cell, formatterParams, onRendered){return cell.getValue()+'°C';}\",\"topCalc\":\"avg\",\"width\":100},{\"formatterParams\":{\"target\":\"_blank\",\"min\":10,\"max\":25,\"color\":[\"blue\",\"green\",\"red\"],\"legend\":\"function (value) {return '&nbsp;&nbsp;'+value+'°C';}\",\"legendColor\":\"#101010\",\"legendAlign\":\"left\"},\"title\":\"current\",\"field\":\"ACTUAL_TEMPERATURE-value\",\"formatter\":\"progress\",\"topCalc\":\"avg\",\"width\":100},{\"formatterParams\":{\"target\":\"_blank\",\"min\":0,\"max\":99,\"color\":[\"gray\",\"orange\",\"red\"],\"legend\":\"function (value) {return (value>0)? '&nbsp;&nbsp;'+value+' %' : '-';}\",\"legendColor\":\"#101010\",\"legendAlign\":\"center\"},\"title\":\"Valve\",\"field\":\"VALVE_STATE-value\",\"formatter\":\"progress\",\"topCalc\":\"max\",\"width\":100},{\"formatterParams\":{\"target\":\"_blank\",\"min\":1.5,\"max\":4.6,\"color\":[\"red\",\"orange\",\"green\"],\"legend\":\"function (value) {return value+' V';}\",\"legendColor\":\"#101010\",\"legendAlign\":\"center\"},\"title\":\"Batt\",\"field\":\"BATTERY_STATE-value\",\"formatter\":\"progress\",\"topCalc\":\"min\",\"width\":100}]},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Settings\",\"columns\":[{\"formatterParams\":{\"target\":\"_blank\",\"min\":0,\"max\":30,\"color\":[\"red\",\"orange\",\"green\"],\"legend\":\"function (value) { if (value>0) return \\\"<span style='color:#101010;'>\\\"+value+\\\" min</span>\\\"; else return \\\"<span style='color:#A0A0A0;'>aus</span>\\\"; }\",\"legendColor\":\"#101010\",\"legendAlign\":\"center\"},\"title\":\"Boost\",\"field\":\"BOOST_STATE-value\",\"formatter\":\"progress\",\"width\":100},{\"formatterParams\":{\"target\":\"_blank\",\"allowEmpty\":true,\"allowTruthy\":true,\"tickElement\":\"<i class='fa fa-clock-o'></i>\",\"crossElement\":\"<i class='fa fa-ban'></i>\"},\"title\":\"Auto\",\"field\":\"AUTO_MODE-value\",\"formatter\":\"tickCross\",\"width\":100,\"align\":\"center\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Mode\",\"field\":\"CONTROL_MODE-value\",\"formatter\":\"function(cell, formatterParams, onRendered){ var html=\\\"<i class=\\\\\\\"\\\"; switch(cell.getValue()) { case 0: html+=\\\"fa fa-calendar-check-o\\\"; break; case 1: html+=\\\"fa fa-hand-o-up\\\"; break; case 2: html+=\\\"fa fa-suitcase\\\"; break; case 3: html+=\\\"fa fa-spinner fa-spin fa-fw\\\"; break; } html+='\\\\\\\"></i>'; return html; }\",\"width\":100,\"align\":\"center\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Auto\",\"field\":\"AUTO_MODE-value\",\"formatter\":\"tick\",\"width\":100,\"align\":\"center\"}]}],\"layout\":\"fitColumns\",\"movableColumns\":true,\"groupBy\":\"\"},\"customHeight\":12}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":655,"y":306,"wires":[["2bb4380c.029bb8"]]},{"id":"3bd564d4.085fac","type":"debug","z":"ab797823.3396a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":968,"y":306,"wires":[]},{"id":"2bb4380c.029bb8","type":"ui_table","z":"ab797823.3396a8","group":"a67c03c2.f7729","name":"Thermostats","order":1,"width":"16","height":"7","columns":[],"outputs":1,"cts":true,"x":818,"y":306,"wires":[["3bd564d4.085fac"]]},{"id":"64136364.f0802c","type":"change","z":"ab797823.3396a8","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"headerVisible\":false,\"columnResized\":\"function(column){ var newColumn = { field: column._column.field, visible: column._column.visible, width: column._column.width, widthFixed: column._column.widthFixed, widthStyled: column._column.widthStyled }; this.send({topic:this.config.topic,ui_control:{callback:'columnResized',columnWidths:newColumn}}); }\",\"columnMoved\":\"function(column, columns){ var newColumns=[]; columns.forEach(function (column) { newColumns.push({'field': column._column.field}); }); this.send({topic:this.config.topic,ui_control:{callback:'columnMoved',columns:newColumns}}); }\",\"groupHeader\":\"function (value, count, data, group) {return value + \\\"<span style='color:#d00; margin-left:10px;'>(\\\" + count + \\\" Termostat\\\"+((count>1) ? \\\"e\\\" : \\\"\\\") + \\\")</span>\\\";}\",\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"ROom\",\"field\":\"room\",\"width\":100,\"frozen\":true,\"headerVisible\":false},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Device\",\"field\":\"name\",\"width\":100,\"align\":\"center\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Type\",\"field\":\"deviceType\",\"width\":100,\"align\":\"center\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Measurements\",\"columns\":[{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"target\",\"field\":\"SET_TEMPERATURE-value\",\"formatter\":\"function(cell, formatterParams, onRendered){return cell.getValue()+'°C';}\",\"topCalc\":\"avg\",\"width\":100},{\"formatterParams\":{\"target\":\"_blank\",\"min\":10,\"max\":25,\"color\":[\"blue\",\"green\",\"red\"],\"legend\":\"function (value) {return '&nbsp;&nbsp;'+value+'°C';}\",\"legendColor\":\"#101010\",\"legendAlign\":\"left\"},\"title\":\"current\",\"field\":\"ACTUAL_TEMPERATURE-value\",\"formatter\":\"progress\",\"topCalc\":\"avg\",\"width\":100},{\"formatterParams\":{\"target\":\"_blank\",\"min\":0,\"max\":99,\"color\":[\"gray\",\"orange\",\"red\"],\"legend\":\"function (value) {return (value>0)? '&nbsp;&nbsp;'+value+' %' : '-';}\",\"legendColor\":\"#101010\",\"legendAlign\":\"center\"},\"title\":\"Valve\",\"field\":\"VALVE_STATE-value\",\"formatter\":\"progress\",\"topCalc\":\"max\",\"width\":100},{\"formatterParams\":{\"target\":\"_blank\",\"min\":1.5,\"max\":4.6,\"color\":[\"red\",\"orange\",\"green\"],\"legend\":\"function (value) {return value+' V';}\",\"legendColor\":\"#101010\",\"legendAlign\":\"center\"},\"title\":\"Batt\",\"field\":\"BATTERY_STATE-value\",\"formatter\":\"progress\",\"topCalc\":\"min\",\"width\":100}]},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Settings\",\"columns\":[{\"formatterParams\":{\"target\":\"_blank\",\"min\":0,\"max\":30,\"color\":[\"red\",\"orange\",\"green\"],\"legend\":\"function (value) { if (value>0) return \\\"<span style='color:#101010;'>\\\"+value+\\\" min</span>\\\"; else return \\\"<span style='color:#A0A0A0;'>aus</span>\\\"; }\",\"legendColor\":\"#101010\",\"legendAlign\":\"center\"},\"title\":\"Boost\",\"field\":\"BOOST_STATE-value\",\"formatter\":\"progress\",\"width\":100},{\"formatterParams\":{\"target\":\"_blank\",\"allowEmpty\":true,\"allowTruthy\":true,\"tickElement\":\"<i class='fa fa-clock-o'></i>\",\"crossElement\":\"<i class='fa fa-ban'></i>\"},\"title\":\"Auto\",\"field\":\"AUTO_MODE-value\",\"formatter\":\"tickCross\",\"width\":100,\"align\":\"center\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Mode\",\"field\":\"CONTROL_MODE-value\",\"formatter\":\"function(cell, formatterParams, onRendered){ var html=\\\"<i class=\\\\\\\"\\\"; switch(cell.getValue()) { case 0: html+=\\\"fa fa-calendar-check-o\\\"; break; case 1: html+=\\\"fa fa-hand-o-up\\\"; break; case 2: html+=\\\"fa fa-suitcase\\\"; break; case 3: html+=\\\"fa fa-spinner fa-spin fa-fw\\\"; break; } html+='\\\\\\\"></i>'; return html; }\",\"width\":100,\"align\":\"center\"},{\"formatterParams\":{\"target\":\"_blank\"},\"title\":\"Auto\",\"field\":\"AUTO_MODE-value\",\"formatter\":\"tick\",\"width\":100,\"align\":\"center\"}]}],\"layout\":\"fitColumns\",\"movableColumns\":true,\"groupBy\":\"\"},\"customHeight\":12}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":655,"y":357,"wires":[["2bb4380c.029bb8"]]},{"id":"e4be2f5a.73dbe","type":"inject","z":"ab797823.3396a8","name":"","topic":"","payload":"[{\"name\":\"MEQ0451495\",\"room\":\"Bathroom\",\"SET_TEMPERATURE-value\":22,\"ACTUAL_TEMPERATURE-value\":21.8,\"VALVE_STATE-value\":90,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":true,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875547\",\"room\":\"Living Room\",\"SET_TEMPERATURE-value\":12,\"ACTUAL_TEMPERATURE-value\":16.2,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":1},{\"name\":\"MEQ1875538\",\"room\":\"Living Room\",\"SET_TEMPERATURE-value\":18,\"ACTUAL_TEMPERATURE-value\":19.5,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.6,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":2},{\"name\":\"MEQ0447462\",\"room\":\"Kitchen\",\"SET_TEMPERATURE-value\":17,\"ACTUAL_TEMPERATURE-value\":22.2,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":10,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":3},{\"name\":\"MEQ1875551\",\"room\":\"Office\",\"SET_TEMPERATURE-value\":18,\"ACTUAL_TEMPERATURE-value\":20.2,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ0447425\",\"room\":\"Dining Room\",\"SET_TEMPERATURE-value\":19,\"ACTUAL_TEMPERATURE-value\":20.4,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875546\",\"room\":\"Dining Room\",\"SET_TEMPERATURE-value\":20,\"ACTUAL_TEMPERATURE-value\":18.8,\"VALVE_STATE-value\":99,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ0447483\",\"room\":\"Bedroom\",\"SET_TEMPERATURE-value\":17,\"ACTUAL_TEMPERATURE-value\":22.4,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875541\",\"room\":\"Child\",\"SET_TEMPERATURE-value\":18,\"ACTUAL_TEMPERATURE-value\":20.4,\"VALVE_STATE-value\":0,\"BATTERY_STATE-value\":2.7,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0},{\"name\":\"MEQ1875552\",\"room\":\"Guest Room\",\"SET_TEMPERATURE-value\":20,\"ACTUAL_TEMPERATURE-value\":21.1,\"VALVE_STATE-value\":9,\"BATTERY_STATE-value\":2.8,\"BOOST_STATE-value\":0,\"AUTO_MODE-value\":false,\"CONTROL_MODE-value\":0}]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":509,"y":357,"wires":[["64136364.f0802c"]]},{"id":"a67c03c2.f7729","type":"ui_group","name":"Group 2","tab":"6c190871.57d428","order":2,"disp":true,"width":16},{"id":"6c190871.57d428","type":"ui_tab","z":"","name":"copypaste","icon":"dashboard","disabled":false,"hidden":false}]

```

I love to send you my flow of my 1st post ... but it is not finished and too big to post here:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/a/9a654927a229b51b356f7d97751b4bd7f3486a23.png)

---

<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: [11 April 2020 18:27 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/12 "2020-04-11T18:27:33Z")

</div>

And by the way ... I use chrome on windows 10 (all latest version)

Sorry ... your change node is correct, the flow is simple, I can`t say what could be wrong:

- Browser?
- Node-RED version (unlikely)
- dashboard version (perhaps)
- ui-table version (perhaps too but unlikely, I did`t changed something regarding how ui\_control messages are passed to tabulator)

Last thing ... are you uising ui-e-table or the "official" ui-table?

---

<div class="post-metadata">

### Author: ![frankzappa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frankzappa/32/19648_2.png) [@frankzappa](https://discourse.nodered.org/u/frankzappa)
#### Post date: [12 April 2020 15:41 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/13 "2020-04-12T15:41:09Z")

</div>

Hi Christian.  
Now I've discovered that ui-table is "official" otherwise that ui-e-table: this last one is the first I've found when I've been searching for a way to create a table...  
This morning was trying to uninstall the ui-e, when after making sudo reboot the sd card died (_#!@/_!#)  
So I'm begginning a new installation of the system.  
When I will finished i will tell you the result.  
Only one thing....  
I was trying to implement a callback, but without result (I attach the code line because I can't open node-red...):

"rowMouseLeave": "function(e, row){this.send({payload:row,ui\_control:{callback:'rowMouseLeave'}});return row.getData());}

I'm sorry but I'm not a programmer (despite I'm studying a lot: js, css, html...).  
Thanks.  
Ah, happy easter.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [12 April 2020 16:09 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/14 "2020-04-12T16:09:35Z")

</div>

> [@frankzappa](#):
>
> the sd card died (

Hopefully with a better quality sd card.

---

<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: [12 April 2020 19:17 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/15 "2020-04-12T19:17:57Z")

</div>

When all is up and running, first take a look at the browser console and look for error messages. Perhaps place the `debugger;` statement at the beginning of your callback function. Or use `console.log();` statements. Remember your callback function works in the browser so all debugging happens there.

---

<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: [12 April 2020 19:25 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/16 "2020-04-12T19:25:02Z")

</div>

What I see in you code (difficult as you do not use the code (preformed text) function is that the return statement makes no sense until you like to return something to tabulator.

```auto

function(e, row){
this.send({payload:row.getData(),ui_control:{callback:'rowMouseLeave'}});
}

```

And please use direct replies to one of my posts or @Christian-Me or it is likely that I don’t get notification of your question

---

<div class="post-metadata">

### Author: ![frankzappa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frankzappa/32/19648_2.png) [@frankzappa](https://discourse.nodered.org/u/frankzappa)
#### Post date: [13 April 2020 12:37 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/17 "2020-04-13T12:37:33Z")

</div>

Reinstalled everything, but headerVisible is continuing not to work.  
Still not implemented the callback, later I will tell you..  
In the console it says, more than the other things: "Invalid column definition option in 'room' column: headerVisible"

 ![Cattura di schermata (11)](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/f/1f876b7afee90bf10a4187aa7c695e1d81092e83.png)

This thing occurs in Chrome and in Mozilla.

---

<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: [13 April 2020 12:42 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/18 "2020-04-13T12:42:01Z")

</div>

Did you put `headerVisible` in the **room** column definition?  
It must be placed in the root tabulator object because it effects the hole table not only a specific column.

```auto
{
    "customHeight": 18,
    "tabulator": {
        "headerVisible":false,
        "index": "id",
        "layout": "fitColumns",
        "movableColumns": true,
        "movableRows": true,
        "groupBy": "",
        "columns": [
            {
                "rowHandle": true,
                "formatter": "handle",
                "headerSort": false,
                "frozen": true,
                "width": 30,
                "minWidth": 30
            },

```

---

<div class="post-metadata">

### Author: ![frankzappa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frankzappa/32/19648_2.png) [@frankzappa](https://discourse.nodered.org/u/frankzappa)
#### Post date: [13 April 2020 12:50 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/19 "2020-04-13T12:50:42Z")

</div>

Yes, it's the first propriety after "tabulator", like yours. I don't know why it don't recognizes it.

---

<div class="post-metadata">

### Author: ![frankzappa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frankzappa/32/19648_2.png) [@frankzappa](https://discourse.nodered.org/u/frankzappa)
#### Post date: [13 April 2020 13:20 UTC](https://discourse.nodered.org/t/callback-as-json-argument/24529/20 "2020-04-13T13:20:11Z")

</div>

Yes, it's the first propriety after "tabulator", like yours. I don't know why it don't recognizes it.

[Next page](https://discourse.nodered.org/t/callback-as-json-argument/24529.md?page=2)
