Pass Placeholder string via msg to ui_dropdown

Based on this link node-red-dashboard/config-fields.md at master · node-red/node-red-dashboard · GitHub it should be possible to assign text to placeholder msg.place, but it doesn't work

My end goal is to have dynamic text before selection is done. If I understand it is not possible to pass msg.label

[
    {
        "id": "9fc31133c5fcda57",
        "type": "inject",
        "z": "ee47c5e8.e17bd",
        "g": "c79d322bfa03965c",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 120,
        "y": 1500,
        "wires": [
            [
                "1ab92735079bc89c"
            ]
        ]
    },
    {
        "id": "5434c618c577b6e3",
        "type": "ui_dropdown",
        "z": "ee47c5e8.e17bd",
        "g": "c79d322bfa03965c",
        "name": "Module4Tags",
        "label": "",
        "tooltip": "",
        "place": "",
        "group": "384ac69668844f73",
        "order": 7,
        "width": 0,
        "height": 0,
        "passthru": true,
        "multiple": true,
        "options": [
            {
                "label": "",
                "value": "",
                "type": "str"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 460,
        "y": 1500,
        "wires": [
            []
        ]
    },
    {
        "id": "1ab92735079bc89c",
        "type": "change",
        "z": "ee47c5e8.e17bd",
        "g": "c79d322bfa03965c",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "options",
                "pt": "msg",
                "to": "[\"M1100.StatDrvFwd\",\"M1100.StatDrvBwd\",\"M1100.ix_DrvRdy\",\"M1100.ix_MtSw\"]",
                "tot": "json"
            },
            {
                "t": "set",
                "p": "place",
                "pt": "msg",
                "to": "PlaceHolder",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 280,
        "y": 1500,
        "wires": [
            [
                "5434c618c577b6e3"
            ]
        ]
    },
    {
        "id": "384ac69668844f73",
        "type": "ui_group",
        "name": "Tags",
        "tab": "89a7ee01bc78fc67",
        "order": 2,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "89a7ee01bc78fc67",
        "type": "ui_tab",
        "name": "Trace2",
        "icon": "dashboard",
        "order": 7,
        "disabled": false,
        "hidden": false
    }
]

The following configuration properties of ui widget nodes can be set by using a msg.ui_control

So set msg. ui_control.palace
To "Placeholder"
[edit]
You can also use {{label}} in the config label field and send msg.label, or any other msg var you wish.

1 Like

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