# UI TAble getRow

**URL:** <https://discourse.nodered.org/t/ui-table-getrow/76670>\
**Category:** Dashboard\
**Created:** [17 March 2023 15:53 UTC](https://discourse.nodered.org/t/ui-table-getrow/76670 "2023-03-17T15:53:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davidinos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/davidinos/32/77557_2.png) [@Davidinos](https://discourse.nodered.org/u/Davidinos)\
**Post date:** [17 March 2023 15:53 UTC](https://discourse.nodered.org/t/ui-table-getrow/76670/1 "2023-03-17T15:53:36Z")

</div>

Goodmorning, I'm working with ui\_tabel and I can correctly deleteRow with function node as follow:

msg.payload = {  
command:"deleteRow",  
arguments: [id],  
returnPromise: true  
}  
node.send(msg);

However, if I try with getRow as follow:

msg.payload = {  
command:"getRow",  
arguments: [id],  
returnPromise: true  
}  
node.send(msg);

It doesn't work. How is it possible?  
Thanks in advanced.

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [17 March 2023 16:26 UTC](https://discourse.nodered.org/t/ui-table-getrow/76670/2 "2023-03-17T16:26:16Z")

</div>

The ui\_table has this checkbox

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

it will return the clicked row at the output of the node

---

<div class="post-metadata">

**Author:** ![Davidinos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/davidinos/32/77557_2.png) [@Davidinos](https://discourse.nodered.org/u/Davidinos)\
**Post date:** [20 March 2023 13:22 UTC](https://discourse.nodered.org/t/ui-table-getrow/76670/3 "2023-03-20T13:22:40Z")

</div>

Hello @UnborN ,  
thank you very much for your answer. Actually I have Send data on click checked but it doesn't work.  
Please check the following flow:

```auto
[{"id":"ffa37464.7197b","type":"function","z":"f8df640c.6a046","name":"table parameter","func":"msg.ui_control = {\n \"customHeight\":12,\n \"tabulator\": {\n \"selectable\":true,\n \"movableColumns\": false,\n \"autoColumns\": true,\n \"selectableRangeMode\": \"click\",\n //\"cellEdited\":\"function(cell) {var change = {newValue:cell.getValue()}; this.send({topic:this.config.topic,ui_control:{callback:'cellEdited',changes:change, id:cell.getRow().getCell('address').getValue()}});}\",\n //\"renderComplete\":\"function() {this.send({ui_control:{callback:'renderComplete'}})}\",\n \"rowSelectionChanged\":\"function(data, rows) {\" + \n \"var selectedRows = []; rows.forEach(function(row) {selectedRows.push(row.getData());});\" +\n \"this.send({topic: this.config.topic, payload: data, selectedRows: selectedRows, ui_control: {callback: 'rowSelectionChanged'}});}\",\n \"columns\":[\n {\n \"field\": \"id\",\n \"title\": \"Address\",\n \"visible\": false,\n \"resizable\":false\n },\n {\n \"field\": \"machineType\",\n \"title\": \"Machine Type\",\n \"resizable\":false\n }\n],\n \"data\":[\n\t {id:1, machineType:\"V300\"}\n]\n },\n};\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":720,"wires":[["8c533146.360d1"]],"info":"\nif (msg.hasOwnProperty('ui_control') && msg.ui_control.callback === \"renderComplete\") {\n var msgOut={\n payload:{\n command:\"selectRow\",\n arguments: [1],\n returnPromise: false\n }\n }\n return msgOut;\n}"},{"id":"b47ec933.5ea67","type":"debug","z":"f8df640c.6a046","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":830,"y":920,"wires":[]},{"id":"57b58021.1bc8f","type":"function","z":"f8df640c.6a046","name":"UnconnectedListOperations","func":"\nmsg.payload = {\n command: \"getRow\",\n arguments: [1],\n returnPromise: true\n};\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":780,"wires":[["8c533146.360d1","b47ec933.5ea67"]]},{"id":"5a358068.ea7b38","type":"inject","z":"f8df640c.6a046","name":"Populate","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":300,"y":720,"wires":[["ffa37464.7197b"]]},{"id":"32acbf9b.939fd","type":"inject","z":"f8df640c.6a046","name":"Command","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":780,"wires":[["57b58021.1bc8f"]]},{"id":"8c533146.360d1","type":"ui_table","z":"f8df640c.6a046","group":"8f6d5436.0e2ac","name":"Node","order":2,"width":"4","height":"5","columns":[{"field":"id","title":"Address","width":"","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"machineType","title":"Machine Type","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":1,"cts":true,"x":670,"y":780,"wires":[["b47ec933.5ea67"]]},{"id":"8f6d5436.0e2ac","type":"ui_group","name":"UnconnectedNode","tab":"afe6a11e.75bc5","order":1,"disp":true,"width":"4","collapse":false},{"id":"afe6a11e.75bc5","type":"ui_tab","name":"Database","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

```

Thank you again.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [20 March 2023 15:14 UTC](https://discourse.nodered.org/t/ui-table-getrow/76670/4 "2023-03-20T15:14:45Z")

</div>

That's what I get when clicking into the table:

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

Do you expect something else?

---

<div class="post-metadata">

**Author:** ![Davidinos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/davidinos/32/77557_2.png) [@Davidinos](https://discourse.nodered.org/u/Davidinos)\
**Post date:** [20 March 2023 15:37 UTC](https://discourse.nodered.org/t/ui-table-getrow/76670/5 "2023-03-20T15:37:14Z")

</div>

Hello @ralphwetzel ,  
thank you for your answer. I could be wrong, but as far as I can tell you get this result clicking on the column "Machine Type". Instead I'd like to get data value, pressing the inject "Command" which calls the function getRow. Can you confirm me that you clicked on the table, instead of the inject "Command"?  
Thank you again.

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [20 March 2023 16:16 UTC](https://discourse.nodered.org/t/ui-table-getrow/76670/6 "2023-03-20T16:16:08Z")

</div>

hmm .. dont know why `getRow` doesnt work .. i tested a few combinations  
`selectRow` seems to be ok if that helps

```javascript
msg.payload = {
    command: "selectRow",
    arguments: [1],
    returnPromise: true
};

```

---

<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:** [19 April 2023 16:16 UTC](https://discourse.nodered.org/t/ui-table-getrow/76670/7 "2023-04-19T16:16:47Z")

</div>

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