# Table not updated cross devices

**URL:** <https://discourse.nodered.org/t/table-not-updated-cross-devices/85862>\
**Category:** Dashboard\
**Created:** [24 February 2024 17:04 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862 "2024-02-24T17:04:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![gNeandr](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gneandr/32/73947_2.png) [@gNeandr](https://discourse.nodered.org/u/gNeandr)\
**Post date:** [24 February 2024 17:04 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/1 "2024-02-24T17:04:10Z")

</div>

One of my flows is: `"fs-file-listener --> dropdown --> readfile --> table"`  
It actually works perfectly.  
The `dropdown` receives the existing file names from `fs-file-listener` and the selected item is send as msg.payload. The file is then read and finally passed on to 'table' for dashboard display.  
_So far so good._

If the same dashboard page is opened on another device, the item selected with `dropdown` on the first device is also displayed on the **second** device, but this change only leads to the table update on the first device, not on the **second** device.

On the one hand, the `dropdown` selection is transferred, but the _update_ of the table on the **second** device is not triggered!  
How should I understand this? Is there a setting that I have not taken into account?

---

<div class="post-metadata">

**Author:** ![gNeandr](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gneandr/32/73947_2.png) [@gNeandr](https://discourse.nodered.org/u/gNeandr)\
**Post date:** [24 February 2024 18:12 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/2 "2024-02-24T18:12:44Z")

</div>

It is obviously not limited to updating the table on the _second_ device.  
There are also two nodes that are supposed to reset the dropdown selection and the search entry.  
This also does not work for an update on the _second_ device.

To make it easier to understand, here is a picture of the flow (simplified)

 ![Bildschirmfoto_2024-02-24_19-03-00](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/8/48d74b0251470df521524a9b45bc43dbb7669fa1.png)

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [24 February 2024 18:35 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/3 "2024-02-24T18:35:08Z")

</div>

@gNeandr

I don't use dashboard, but for anyone to verify any issues - please can you provide an example flow export.

````auto
```
{Flow Export}
```

````

I have also moved this to the **Dashboard** category

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [24 February 2024 19:14 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/4 "2024-02-24T19:14:51Z")

</div>

A example of the content of the file you are sending to the table may also be handy.

how are you updating the table data, some people report a refresh is required.

Have you tried sending the new table data in an replaceData table command.  
e.g.

```auto
msg.payload = {
    command:"replaceData",
    arguments:[[table data array]]
}

```

Also check the complete message sent to table, and make sure there is no socketid, as the dropdown would of added one.

---

<div class="post-metadata">

**Author:** ![gNeandr](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gneandr/32/73947_2.png) [@gNeandr](https://discourse.nodered.org/u/gNeandr)\
**Post date:** [24 February 2024 19:51 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/5 "2024-02-24T19:51:05Z")

</div>

Thanks for the tips.  
Since I have noticed that in addition to the failed table update, the update for the dropdown (DayList Selector) also fails (see my second posting), here are the nodes within the group "nodesto rest ..." :

```auto
[{ "id": "ccf926a811519bb0", "type": "ui_dropdown", "z": "49ccc67f8fc92295", "name": "DayList Selector", "label": "", "tooltip": "", "place": "Tagesplan auswählen", "group": "e2fd462af0755c51", "order": 2, "width": 4, "height": 1, "passthru": true, "multiple": false, "options": [ { "label": "", "value": "", "type": "str" }], "payload": "", "topic": "", "topicType": "str", "className": "", "x": 380, "y": 580, "wires": [[ "a4b997df28ec6736", "ddbcb0e58f606854"] ] }, { "id": "fd19bb15de3dba65", "type": "delay", "z": "49ccc67f8fc92295", "name": "", "pauseType": "delay", "timeout": "1", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 1000, "y": 460, "wires": [[ "ccf926a811519bb0"] ] }, { "id": "a4b997df28ec6736", "type": "function", "z": "49ccc67f8fc92295", "name": "reset dropdown", "func": " // clear dropdown\n\nlet dayname = (msg.payload.replace(/^.*(\\\\|\\/|\\:)/, '')).replace(\".json\", \"\")\n\nlet msg1 = {};\nmsg1.payload = dayname;\n\nmsg.resetSearch = true;\nmsg.payload = \"\";\nreturn ([msg, msg1]);", "outputs": 2, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 760, "y": 480, "wires": [[ "fd19bb15de3dba65", "32fd6bc6e01068a7"], ["c21e8986481bf9a7", "65eaf0d8bdef0635"] ] }, { "id": "e2fd462af0755c51", "type": "ui_group", "name": "Gruppe1", "tab": "8a24228be010fbe6", "order": 1, "disp": false, "width": "12", "collapse": false, "className": "" }, { "id": "8a24228be010fbe6", "type": "ui_tab", "name": "Tagesliste", "icon": "dashboard", "order": 2, "disabled": false, "hidden": false } ]

```

Fmpov both situations have the same background ... but which?

---

<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:** [25 February 2024 21:30 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/6 "2024-02-25T21:30:19Z")

</div>

Did you notice the advice to make sure the message you are passing in does not have a socketid property? Add a Change node set to Delete msg.socketid, or do it in the function node.

---

<div class="post-metadata">

**Author:** ![gNeandr](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gneandr/32/73947_2.png) [@gNeandr](https://discourse.nodered.org/u/gNeandr)\
**Post date:** [25 February 2024 23:29 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/7 "2024-02-25T23:29:41Z")

</div>

To be honest, I had doubts that sending without socketid was the solution.  
After testing, I see that it doesn't work at all. Even on the _first_ device, the selected list is also not shown.  
(NB: is `msg.socketid= ""` sufficient, or should it be worded differently?)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 February 2024 06:38 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/8 "2024-02-26T06:38:59Z")

</div>

No that sets it to a blank string, which will match no devices as you found out. You need to delete it.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 February 2024 07:27 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/9 "2024-02-26T07:27:00Z")

</div>

In a function node.

```auto
delete msg.socketid;

or

msg.socketid = undefined;

```

---

<div class="post-metadata">

**Author:** ![gNeandr](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gneandr/32/73947_2.png) [@gNeandr](https://discourse.nodered.org/u/gNeandr)\
**Post date:** [26 February 2024 09:19 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/10 "2024-02-26T09:19:16Z")

</div>

@Colin @dceejay@E1cid

Hello friends,

Thank you for being so insistent.  
Finally the advice with `msg.socketid = undefined; ` helped.  
Since the flow is somewhat complex, this has to be inserted in some places. A bit awkward, but the solution counts. Thank you!

---

<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:** [11 March 2024 09:20 UTC](https://discourse.nodered.org/t/table-not-updated-cross-devices/85862/11 "2024-03-11T09:20:03Z")

</div>

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