# Etable dynamic editorparam

**URL:** <https://discourse.nodered.org/t/etable-dynamic-editorparam/41153>\
**Category:** General\
**Created:** [17 February 2021 12:15 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153 "2021-02-17T12:15:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![JuananJG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juananjg/32/35951_2.png) [@JuananJG](https://discourse.nodered.org/u/JuananJG)\
**Post date:** [17 February 2021 12:15 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/1 "2021-02-17T12:15:11Z")

</div>

hi guys,  
I need to select one option in etable, but this option is dynamic and arrive in the message.

static option:  
 ![Captura3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/2/f2fa2407a5227df201ec98fd8533b12d5add2cd9.png)

dyanmic option:(this is example)  
 ![Captura1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/d/1d81ef509d53252e25da9859786dc9d1b0faa8a9.png)

```auto
[{"id":"dc82b683.d8aa18","type":"function","z":"cd4a9cc8.24c9a","name":"LEER_CODIGOS_DE_PARADA","func":"Instruccion = \"SELECT * FROM IOTCAU;\";\n\nmsg.topic= Instruccion;\n\nreturn msg;\n","outputs":1,"noerr":0,"x":603.7657928466797,"y":1000.7499494552612,"wires":[["66de576d.fc4ea8"]]},{"id":"66de576d.fc4ea8","type":"mysql","z":"cd4a9cc8.24c9a","mydb":"2fe39f59.0d672","name":"","x":932.7658061981201,"y":1001.7500247955322,"wires":[["bde19f6d.9073","19363107.1bce6f","1ec863dc.72b81c"]]},{"id":"bde19f6d.9073","type":"ui_etable","z":"cd4a9cc8.24c9a","payload":"[{\"title\":\"FASE\",\"field\":\"Fase\",\"editor\":false,\"width\":90,\"align\":\"right\",\"headerVisible\":false},{\"title\":\"CAUSA\",\"field\":\"Causa\",\"editor\":false,\"width\":350,\"align\":\"left\",\"headerVisible\":false},{\"title\":\"T. EJECUCION\",\"field\":\"Tiempo ejec\",\"editor\":false,\"width\":140,\"align\":\"right\",\"headerVisible\":false},{\"title\":\"RENDIMIENTO\",\"field\":\"Rdto_op\",\"editor\":false,\"width\":140,\"align\":\"right\",\"headerVisible\":false}]","payloadType":"json","options":"{\"height\":\"500px\",\"layout\":\"fitColumns\",\"headerVisible\":true}","group":"c3d7d3f.e6afc3","name":"CODIGOS_DE_PARADA","order":8,"width":"14","height":"10","columns":[],"outputs":1,"cts":false,"x":1299.5081024169922,"y":1003.5234022140503,"wires":[[]]},{"id":"19363107.1bce6f","type":"debug","z":"cd4a9cc8.24c9a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1600.6668510437012,"y":904.6667318344116,"wires":[]},{"id":"1ec863dc.72b81c","type":"ui_etable","z":"cd4a9cc8.24c9a","payload":"[{\"title\":\"OPERARIO\",\"field\":\"Operario\",\"editor\":false,\"width\":150,\"align\":\"right\",\"headerVisible\":false},{\"title\":\"HORA INICIO\",\"field\":\"HoraInicio\",\"editor\":false,\"width\":150,\"align\":\"left\",\"headerVisible\":false},{\"title\":\"HORA FIN\",\"field\":\"HoraFin\",\"editor\":false,\"width\":150,\"align\":\"right\",\"headerVisible\":false},{\"title\":\"CAUSA\",\"field\":\"CausaParada\",\"editor\":\"select\",\"width\":100,\"align\":\"right\",\"headerVisible\":true,\"editorParams\":{\"HoraInicio\":[]}}]","payloadType":"json","options":"{\"height\":\"500px\",\"layout\":\"fitColumns\",\"headerVisible\":true}","group":"c3d7d3f.e6afc3","name":"REGISTRO_DE_PARADA","order":8,"width":"12","height":"10","columns":[],"outputs":1,"cts":false,"x":1315.6669120788574,"y":904.6667037010193,"wires":[["19363107.1bce6f"]]},{"id":"a924656.364d298","type":"function","z":"cd4a9cc8.24c9a","name":"LEER REGISTRO DE PARADAS","func":"\nInstruccion = \"SELECT * FROM RegistroParadas;\";\nmsg.topic = Instruccion;\n\nreturn msg;\n","outputs":1,"noerr":0,"x":604.6667060852051,"y":905.666672706604,"wires":[["f099a9fd.2183e8"]]},{"id":"f099a9fd.2183e8","type":"mysql","z":"cd4a9cc8.24c9a","mydb":"c9bfae9d.a5899","name":"","x":936.6666946411133,"y":904.6666884422302,"wires":[["1ec863dc.72b81c"]]},{"id":"579e5445.8312cc","type":"inject","z":"cd4a9cc8.24c9a","name":"","topic":"","payload":"","payloadType":"date","repeat":"20","crontab":"","once":false,"onceDelay":0.1,"x":224.765625,"y":905.7499408721924,"wires":[["a924656.364d298"]]},{"id":"ced1f6c.fa6ea08","type":"inject","z":"cd4a9cc8.24c9a","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":"30","x":233.87905883789062,"y":998.941424369812,"wires":[["dc82b683.d8aa18"]]},{"id":"2fe39f59.0d672","type":"MySQLdatabase","z":"","name":"","host":"192.168.2.121","port":"3360","db":"PLC","tz":"","charset":""},{"id":"c3d7d3f.e6afc3","type":"ui_group","z":"","name":"REGISTROS DE PARADA","tab":"87a1e3fe.5548b","order":3,"disp":true,"width":"27","collapse":false},{"id":"c9bfae9d.a5899","type":"MySQLdatabase","z":"","name":"","host":"localhost","port":"3306","db":"COR3582","tz":"","charset":""},{"id":"87a1e3fe.5548b","type":"ui_tab","z":"","name":"REGISTRO DE PARADAS","icon":"dashboard","disabled":false,"hidden":false}]

```

I need to change the static values ​​for dynamic values  
msg.payload[0].Fase .... msg.payload[1].Fase .....

is this possible?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [17 February 2021 15:16 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/2 "2021-02-17T15:16:18Z")

</div>

Could you give some more detail? For instance, I for one, have no idea what etable is.

It would also help if you showed the entire message and an example of what you mean about changing the static values to dynamic values. What dynamic value?

An export of your flow might be helpful too, in order to make code more readable and importable it is important to surround your code with three backticks  
`````  
`like this`  
`````

You can edit and correct your post by clicking the pencil icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<div class="post-metadata">

**Author:** ![JuananJG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juananjg/32/35951_2.png) [@JuananJG](https://discourse.nodered.org/u/JuananJG)\
**Post date:** [17 February 2021 16:49 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/3 "2021-02-17T16:49:18Z")

</div>

Modified. Thanks  
I hope you can help me

---

<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:** [17 February 2021 17:01 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/4 "2021-02-17T17:01:31Z")

</div>

You have added the backticks after the flow but not before.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [17 February 2021 17:05 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/5 "2021-02-17T17:05:56Z")

</div>

what is etable?  
go back and reread the post about sharing your code.

create a demo flow showing the issue. Use an inject or template to provide the incoming data - after all, No one else has access to your daabase

as for changing the data, anything is possible you just have to define what needs to be changed to what.

---

<div class="post-metadata">

**Author:** ![JuananJG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juananjg/32/35951_2.png) [@JuananJG](https://discourse.nodered.org/u/JuananJG)\
**Post date:** [22 February 2021 10:04 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/6 "2021-02-22T10:04:28Z")

</div>

Hi,  
this is the sample code.  
I need the values in column 3 to be selectable by the values .... payload .Phase.

```auto
[{"id":"88d6b865.9b6a08","type":"ui_etable","z":"ccd07d4.255298","payload":"[{\"title\":\"col1\",\"field\":\"Code\",\"width\":\"10%\",\"editor\":false},{\"title\":\"Col2\",\"field\":\"Prty\",\"width\":\"80%\",\"editor\":false},{\"title\":\"Col3\",\"field\":\"Fase\",\"editor\":\"select\",\"editorParams\":{\"values\":[\"NEW\",\"UPDATED\",\"CANCELED\"]}}]","payloadType":"json","options":"{\"movableColumns\":true,\"layout\":\"fitColumns\",\"pagination\":\"local\",\"height\":\"700px\"}","group":"13bb5f9c.48a68","name":"","order":2,"width":"20","height":"7","columns":[],"outputs":1,"cts":false,"x":655,"y":200,"wires":[["f79698a3.e4bc88"]],"l":false},{"id":"2d1616f7.7c5dca","type":"function","z":"ccd07d4.255298","name":"","func":"msg.payload = [\n{ \"Code\":\"0\", \"Prty\" : \"3122\", \"Fase\" : 'A'},\n{ \"Code\":\"1\", \"Prty\" : \"2345\", \"Fase\" : 'B'},\n{ \"Code\":\"2\", \"Prty\" : \"3636\", \"Fase\" : 'C'},\n{ \"Code\":\"3\", \"Prty\" : \"3322\", \"Fase\" : 'D'},\n{ \"Code\":\"4\", \"Prty\" : \"3234\", \"Fase\" : 'E'},\n{ \"Code\":\"5\", \"Prty\" : \"hola\", \"Fase\" : 'F'},\n{ \"Code\":\"6\", \"Prty\" : \"hello\", \"Fase\" : 'G'}];\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":200,"wires":[["88d6b865.9b6a08","282c14f6.286c2c"]]},{"id":"f79698a3.e4bc88","type":"ui_text","z":"ccd07d4.255298","group":"13bb5f9c.48a68","order":2,"width":"8","height":"3","name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":1010,"y":200,"wires":[]},{"id":"308ea427.1438ac","type":"inject","z":"ccd07d4.255298","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":220,"y":200,"wires":[["2d1616f7.7c5dca"]]},{"id":"282c14f6.286c2c","type":"debug","z":"ccd07d4.255298","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":820,"y":300,"wires":[]},{"id":"13bb5f9c.48a68","type":"ui_group","name":"test","tab":"700e0299.f39d8c","order":1,"disp":true,"width":"20","collapse":false},{"id":"700e0299.f39d8c","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![JuananJG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juananjg/32/35951_2.png) [@JuananJG](https://discourse.nodered.org/u/JuananJG)\
**Post date:** [22 February 2021 10:15 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/7 "2021-02-22T10:15:32Z")

</div>

Thanks,  
I modified the text  
Hope it's understandable

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [22 February 2021 11:41 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/8 "2021-02-22T11:41:38Z")

</div>

Have you looked at the example flow? [Node-Red-Contrib-UI-Etable Example1 (flow) - Node-RED](https://flows.nodered.org/flow/0dcb1fe12a68b674b395b8adb3920dc0)

I'm still not clear on what you are trying to do. Could you walk it thru step by step? I see in you r flow you

1. inject a msg.payload with a boolean `true`
2. next comes a `function` node that you hard code a table of seven (7) rows
3. that is sent to the `etable` node and shows up - in the dashboard - with the data from the `function` node

And in that table you if you click on an item in col3 of any row, a drop down appears.

So what do you want it to do?

---

<div class="post-metadata">

**Author:** ![JuananJG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juananjg/32/35951_2.png) [@JuananJG](https://discourse.nodered.org/u/JuananJG)\
**Post date:** [23 February 2021 09:53 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/9 "2021-02-23T09:53:59Z")

</div>

Hello,

This is an example that summarizes my problem.  
I need to generate a table where the values ​​of a column are selectable.  
But the values ​​to select come from a msg. These would be the ones that I now show in column 3.

Therefore, the values ​​that I show in column 3 would be those that should appear in the selection of each box.

![Captura4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/4/84e262a8f368e6a9bee98d9c89b62a4d04ca7c5b.png)

Therefore in this example for the first row of column 3 the values ​​to select would be A, B, C, D ...

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [23 February 2021 11:15 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/10 "2021-02-23T11:15:02Z")

</div>

From what I can see (without digging into the node's code) you can't do it. You would have to define thoes options in the e`etable` node's 'Columns' option.

This node is very lacking in documentation but you could try asking the author on the node's GitHub page.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 April 2021 11:15 UTC](https://discourse.nodered.org/t/etable-dynamic-editorparam/41153/11 "2021-04-24T11:15:43Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
