Dropdown node - what am I missing

[Newbie] Following a video guide on how to set up a dropdown in Node-Red seemed very straightforward, as I am using a static list in the dropdown. Using "MSG.Dropdown"

However, I see the MSG output via the debug but with 'undefined'. When I change to "payload", it works fine - I assume I need to define the MSG."XXXX"

Can you post a very simple example that shows the problem please. Construct a flow just consisting of, for example, inject nodes and a dropdown node and export it and paste it here. Then we can see exactly what you are doing.

Error - (Debug)

node: dropboxmsg.StatusIndicator : undefined

undefined

[
    {
        "id": "ca2d49bace6edc8d",
        "type": "ui_dropdown",
        "z": "0ca665b062017a5c",
        "name": "Dropdown",
        "label": "status drop down example",
        "tooltip": "",
        "place": "Select option",
        "group": "585234b827bfcc73",
        "order": 11,
        "width": 0,
        "height": 0,
        "passthru": false,
        "multiple": false,
        "options": [
            {
                "label": "Identify",
                "value": "StatusIndicatorIdentify",
                "type": "str"
            },
            {
                "label": "Strobe",
                "value": "StatusIndicatorStrobe",
                "type": "str"
            },
            {
                "label": "RedFlash",
                "value": "StatusIndicatorRedFlash",
                "type": "str"
            },
            {
                "label": "WhiteFlash",
                "value": "StatusIndicatorWhiteFlash",
                "type": "str"
            }
        ],
        "payload": "",
        "topic": "StatusIndicator",
        "topicType": "msg",
        "className": "",
        "x": 106,
        "y": 248,
        "wires": [
            [
                "56c4f8b31bdc16d7"
            ]
        ]
    },
    {
        "id": "585234b827bfcc73",
        "type": "ui_group",
        "name": "TESTENV",
        "tab": "1fe70ca413e94732",
        "order": 1,
        "disp": true,
        "width": 6,
        "collapse": false,
        "className": ""
    },
    {
        "id": "1fe70ca413e94732",
        "type": "ui_tab",
        "name": "TEST",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

There is no msg.dropdown in node-red-dashboard dropdown.

The output of the dropdown is always in msg.payload.

really - must ter msg always be "payload" regardless?

The output is mg.payload, you can move the output to any property you like after the dropdown node.

1 Like

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