Can't change the label on button

Hi, I've read the guide, I'm sending object msg.ui_update.label to the button with a string with new name, the button doesn't react. What is wrong here? Thank you

[
    {
        "id": "2c84fc994beb3c9a",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "af8b342db2cd0f90",
        "type": "ui_button",
        "z": "2c84fc994beb3c9a",
        "name": "",
        "group": "a6e637c6f7085f9c",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "to be changed",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 240,
        "y": 160,
        "wires": [
            []
        ]
    },
    {
        "id": "eaa7be591897d811",
        "type": "inject",
        "z": "2c84fc994beb3c9a",
        "name": "",
        "props": [
            {
                "p": "ui_update.label",
                "v": "changed",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 70,
        "y": 160,
        "wires": [
            [
                "af8b342db2cd0f90",
                "482e84e621165acc"
            ]
        ]
    },
    {
        "id": "482e84e621165acc",
        "type": "debug",
        "z": "2c84fc994beb3c9a",
        "name": "debug",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 210,
        "y": 220,
        "wires": []
    },
    {
        "id": "a6e637c6f7085f9c",
        "type": "ui_group",
        "name": "vdv",
        "tab": "8f630d07b288f0e4",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "8f630d07b288f0e4",
        "type": "ui_tab",
        "name": "Telecomando",
        "icon": "dashboard",
        "disabled": false,
        "hidden": true
    }
]

That is from the online help for @flowfuse/node-red-dashboard AKA Dashboard v2 while your button is from node-red-dashboard AKA Dashboard v1.

If only the designers had specified a different icon colour in the editor for the new dashboard widgets, you could tell which one you have in the editor and this kind of confusion would be less likely.

Somebody should have suggested it :raising_hand_man:

1 Like

From the nodes help, you can change this by msg -

The label and icon can also be set by a message property by setting the field to the name of the property, for example {{topic}} or {{myicon}} .

To use msg.ui_control the format is like this
image

Be more forceful next time :wink:

I agree, even to the extent of calling the new Flowfuse ui Dashboard wasn't a brilliant idea either tbh.

THnak you all for kind help, yes it's really tricky to don't make evident that there are 2 different Dashboards, I thought v2 is official and relplaced v1 automatically.
What do you suggest me to work with? I can't find good infos about how better is v2 instead of v1, maybe only charts are improved?
Sincerely, as I have to type the url on mobiles, I don't like to write extensively /dashboard/name, there is a way to short dashboard on URL?
Ok in v2 I can change the label, but I didin't understand how to do this with v1, {{topic}} or `{{myicon}}' has no sense for me, can you please explain me what the msg object exactly should contain to change the label? thank you!

I posted 2 ways to change the label in Dashboard V1.

You can either send a msg.ui_control message similar to the one shown in the previous image, OR add a payload property with a name of your choosing containing the new label text, and then included that property in the button config inside {{ }} brackets. eg msg.label

image

Dashboard v2 is a complete re-write. It's far from being finished but is under active development.
If you keep drilling down into a dashboard 2 widget, you come to a config for ui-base where there is a field for the relative URL. /dashboard is the only option just at the moment but presumably one day it will change.

With dashboard v1 you can use your msg.ui_update.label by setting the "Label" field to {{ui_update.label}}

Probably you would be best advised to start developing for dashboard 2 because DB1 might eventually become unusable.
Unfortunately it is not a trivial process to migrate from DB1 to DB2.