# Using dashboard drop down to pass payload based on topic

**URL:** <https://discourse.nodered.org/t/using-dashboard-drop-down-to-pass-payload-based-on-topic/92613>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [23 October 2024 17:56 UTC](https://discourse.nodered.org/t/using-dashboard-drop-down-to-pass-payload-based-on-topic/92613 "2024-10-23T17:56:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matz](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@matz](https://discourse.nodered.org/u/matz)\
**Post date:** [23 October 2024 17:56 UTC](https://discourse.nodered.org/t/using-dashboard-drop-down-to-pass-payload-based-on-topic/92613/1 "2024-10-23T17:56:52Z")

</div>

Hi, I am new to node red. I am trying to get data from multiple devices and sent it to a dashboard page using drop down to pass the right payload.

here is the example

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c794c270db87fd04aca04d0223587f29bbf72594.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/0/106952f3e2b3e082f648d3ddef7c3d077ffcd173.png)

```auto
[
    {
        "id": "626ec5dce53a65fc",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "23bec8e04e6406c5",
        "type": "eth-ip in",
        "z": "626ec5dce53a65fc",
        "endpoint": "da4721585531cece",
        "mode": "all",
        "variable": "",
        "program": "",
        "name": "",
        "gatherMetrics": false,
        "includeTimestamp": false,
        "x": 150,
        "y": 200,
        "wires": [
            [
                "4d475625e7ec1cc9"
            ]
        ]
    },
    {
        "id": "ae66af99dfa009a3",
        "type": "eth-ip in",
        "z": "626ec5dce53a65fc",
        "endpoint": "eb6f7232de6999ca",
        "mode": "all",
        "variable": "",
        "program": "",
        "name": "",
        "x": 150,
        "y": 260,
        "wires": [
            [
                "1f5ee82823ba4c6d"
            ]
        ]
    },
    {
        "id": "e3692c990159e0f5",
        "type": "eth-ip in",
        "z": "626ec5dce53a65fc",
        "endpoint": "926eb7ee9b1aedaa",
        "mode": "all",
        "variable": "",
        "program": "",
        "name": "",
        "gatherMetrics": false,
        "includeTimestamp": false,
        "x": 150,
        "y": 140,
        "wires": [
            [
                "0d36b2ee0175208a"
            ]
        ]
    },
    {
        "id": "0d36b2ee0175208a",
        "type": "change",
        "z": "626ec5dce53a65fc",
        "name": "msg.topic=1",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 310,
        "y": 140,
        "wires": [
            [
                "fca6e19d63574137",
                "fe4926d785b2f1ed"
            ]
        ]
    },
    {
        "id": "4d475625e7ec1cc9",
        "type": "change",
        "z": "626ec5dce53a65fc",
        "name": "msg.topic=2",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 310,
        "y": 200,
        "wires": [
            [
                "fca6e19d63574137",
                "9294d4feb069bba0"
            ]
        ]
    },
    {
        "id": "1f5ee82823ba4c6d",
        "type": "change",
        "z": "626ec5dce53a65fc",
        "name": "msg.topic=2",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "3",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 310,
        "y": 260,
        "wires": [
            [
                "fca6e19d63574137"
            ]
        ]
    },
    {
        "id": "fca6e19d63574137",
        "type": "ui_dropdown",
        "z": "626ec5dce53a65fc",
        "name": "",
        "label": "",
        "tooltip": "",
        "place": "Select option",
        "group": "d315711a6f3aaf83",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "Cell1",
                "value": "1",
                "type": "str"
            },
            {
                "label": "Cell2",
                "value": "2",
                "type": "str"
            },
            {
                "label": "Cell3",
                "value": "3",
                "type": "str"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 640,
        "y": 160,
        "wires": [
            [
                "4eea6591cc091c48"
            ]
        ]
    },
    {
        "id": "4eea6591cc091c48",
        "type": "ui_numeric",
        "z": "626ec5dce53a65fc",
        "name": "",
        "label": "numeric",
        "tooltip": "",
        "group": "d315711a6f3aaf83",
        "order": 2,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{msg.payload.PDM.Month.Day[18].Done_Part}}",
        "min": 0,
        "max": 10,
        "step": 1,
        "className": "",
        "x": 800,
        "y": 160,
        "wires": [
            []
        ]
    },
    {
        "id": "fe4926d785b2f1ed",
        "type": "debug",
        "z": "626ec5dce53a65fc",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 540,
        "y": 80,
        "wires": []
    },
    {
        "id": "9294d4feb069bba0",
        "type": "debug",
        "z": "626ec5dce53a65fc",
        "name": "debug 4",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 560,
        "y": 280,
        "wires": []
    },
    {
        "id": "da4721585531cece",
        "type": "eth-ip endpoint",
        "address": "10.6.9.20",
        "slot": "0",
        "cycletime": "5000",
        "timeout": "10000",
        "name": "Cell 2",
        "connectedMess": false,
        "vartable": {
            "": {
                "PDM.Month.Day[18].Done_Part": {
                    "type": "INT",
                    "mapping": ""
                }
            }
        }
    },
    {
        "id": "eb6f7232de6999ca",
        "type": "eth-ip endpoint",
        "address": "10.6.9.30",
        "slot": "0",
        "cycletime": "3000",
        "name": "Cell 3",
        "vartable": {
            "": {
                "PDM_Live.Name": {
                    "type": "STRING",
                    "mapping": ""
                },
                "PDM_Live.Done_Part": {
                    "type": "INT",
                    "mapping": ""
                },
                "Cell_Seq_Mapping.CNC_Running": {
                    "type": "BOOL",
                    "mapping": ""
                },
                "PDM_Live.Part_Cycle_Time": {
                    "type": "REAL",
                    "mapping": ""
                },
                "PDM_Live.Tot_DownTime": {
                    "type": "REAL",
                    "mapping": ""
                },
                "PDM_Live.Raw_Part": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.L_CNC_Run_hr1": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.L_CNC_Run_hr2": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.L_CNC_Run_Min1": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.L_CNC_Run_Min2": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.L_CNC_Run_Sec1": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.L_CNC_Run_Sec2": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.ROB_Run_hr1": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.ROB_Run_hr2": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.ROB_Run_Min1": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.ROB_Run_Min2": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.ROB_Run_Sec1": {
                    "type": "INT",
                    "mapping": ""
                },
                "Timesheet.ROB_Run_Sec2": {
                    "type": "INT",
                    "mapping": ""
                },
                "PDM.Month.Day[18].Done_Part": {
                    "type": "INT",
                    "mapping": ""
                },
                "PDM.Months[0]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[1]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[2]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[3]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[4]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[5]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[6]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[7]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[8]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[9]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[10]": {
                    "type": "",
                    "mapping": ""
                },
                "PDM.Months[11]": {
                    "type": "",
                    "mapping": ""
                }
            }
        }
    },
    {
        "id": "926eb7ee9b1aedaa",
        "type": "eth-ip endpoint",
        "address": "10.6.9.10",
        "slot": "0",
        "cycletime": "3000",
        "timeout": 10000,
        "name": "Cell 1",
        "vartable": {
            "": {
                "PDM.Month.Day[18].Done_Part": {
                    "type": "INT",
                    "mapping": ""
                }
            }
        }
    },
    {
        "id": "d315711a6f3aaf83",
        "type": "ui_group",
        "name": "Default",
        "tab": "4e4e12d7425ccf54",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "4e4e12d7425ccf54",
        "type": "ui_tab",
        "name": "Live data",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

```

---

<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:** [23 October 2024 18:21 UTC](https://discourse.nodered.org/t/using-dashboard-drop-down-to-pass-payload-based-on-topic/92613/2 "2024-10-23T18:21:47Z")

</div>

Hi and welcome

You maybe better of switching to dashboard 2 , as it is new and DB 1 is deprecated.

> **[@flowfuse/node-red-dashboard](https://flows.nodered.org/node/@flowfuse/node-red-dashboard)**
>
> Dashboard 2.0 - A collection of Node-RED nodes that provide functionality to build your own UI applications (inc. forms, buttons, charts).

> **[Node-RED Dashboard 2.0](https://dashboard.flowfuse.com/)**
>
> Discover the features and benefits of Node-RED Dashboard 2.0, designed to streamline and enhance your Node-RED experience.

Here is a DB1 example to give you some ideas.

```auto
[{"id":"0c71a1906bca51a9","type":"inject","z":"626ec5dce53a65fc","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"test\":1}","payloadType":"json","x":120,"y":140,"wires":[["0d36b2ee0175208a"]]},{"id":"0d36b2ee0175208a","type":"change","z":"626ec5dce53a65fc","name":"msg.topic=1","rules":[{"t":"set","p":"topic","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":140,"wires":[["ed9f86f6cceb927d"]]},{"id":"ed9f86f6cceb927d","type":"join","z":"626ec5dce53a65fc","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":590,"y":260,"wires":[["9294d4feb069bba0","870bbd4478ef81cd"]]},{"id":"4d475625e7ec1cc9","type":"change","z":"626ec5dce53a65fc","name":"msg.topic=2","rules":[{"t":"set","p":"topic","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":200,"wires":[["ed9f86f6cceb927d"]]},{"id":"1f5ee82823ba4c6d","type":"change","z":"626ec5dce53a65fc","name":"msg.topic=2","rules":[{"t":"set","p":"topic","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":260,"wires":[["ed9f86f6cceb927d"]]},{"id":"fca6e19d63574137","type":"ui_dropdown","z":"626ec5dce53a65fc","name":"","label":"","tooltip":"","place":"Select option","group":"d315711a6f3aaf83","order":1,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"Cell1","value":"1","type":"str"},{"label":"Cell2","value":"2","type":"str"},{"label":"Cell3","value":"3","type":"str"}],"payload":"","topic":"dropdown","topicType":"str","className":"","x":280,"y":360,"wires":[["ed9f86f6cceb927d"]]},{"id":"9294d4feb069bba0","type":"debug","z":"626ec5dce53a65fc","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":800,"y":80,"wires":[]},{"id":"870bbd4478ef81cd","type":"change","z":"626ec5dce53a65fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"msg.payload[msg.payload.dropdown].test","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":260,"wires":[["4eea6591cc091c48"]]},{"id":"10a603ab445f5812","type":"inject","z":"626ec5dce53a65fc","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"test\":2}","payloadType":"json","x":120,"y":200,"wires":[["4d475625e7ec1cc9"]]},{"id":"661c97a6bd3bfc65","type":"inject","z":"626ec5dce53a65fc","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"test\":3}","payloadType":"json","x":120,"y":260,"wires":[["1f5ee82823ba4c6d"]]},{"id":"4eea6591cc091c48","type":"ui_numeric","z":"626ec5dce53a65fc","name":"","label":"numeric","tooltip":"","group":"d315711a6f3aaf83","order":2,"width":0,"height":0,"wrap":false,"passthru":false,"topic":"topic","topicType":"msg","format":"{{value}}","min":0,"max":10,"step":1,"className":"","x":800,"y":160,"wires":[[]]},{"id":"d315711a6f3aaf83","type":"ui_group","name":"Default","tab":"4e4e12d7425ccf54","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"4e4e12d7425ccf54","type":"ui_tab","name":"Live data","icon":"dashboard","disabled":false,"hidden":false}]

```

[How to import/export a flow](https://nodered.org/docs/user-guide/editor/workspace/import-export)

---

<div class="post-metadata">

**Author:** ![matz](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@matz](https://discourse.nodered.org/u/matz)\
**Post date:** [23 October 2024 18:49 UTC](https://discourse.nodered.org/t/using-dashboard-drop-down-to-pass-payload-based-on-topic/92613/3 "2024-10-23T18:49:54Z")

</div>

> [@E1cid](#):
>
> `a1906bca51a9","type":"inject","z":"626ec5dce53a65fc","name":`

Thank you, I will look into Dashboard 2.0

---

<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:** [22 November 2024 18:50 UTC](https://discourse.nodered.org/t/using-dashboard-drop-down-to-pass-payload-based-on-topic/92613/4 "2024-11-22T18:50:34Z")

</div>

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