Dashboard notification OK/Cancel dialog with input wont send the value "1"

Hi.

I have a problem with the Dashboard Notification node.
I choose "OK/Cancel dialog with input". The description sys that this notification will send the value from the user input in msg.payload.
But when I try to enter the value "1", the text from the OK button is sent.
If I enter the value "0", then the msg.payload is "0" as expected.
So, anything other than the value "1" is sent.
A bug?

Best regards
Steffen

Please post a simple flow showing the problem.

[
    {
        "id": "ac631a6e.90e038",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": ""
    },
    {
        "id": "e4831b1f.a5a618",
        "type": "ui_toast",
        "z": "ac631a6e.90e038",
        "position": "prompt",
        "displayTime": "3",
        "highlight": "",
        "sendall": true,
        "outputs": 1,
        "ok": "Set",
        "cancel": "Cancel",
        "raw": false,
        "className": "",
        "topic": "",
        "name": "",
        "x": 430,
        "y": 320,
        "wires": [
            [
                "7b0e8ae1.98c404"
            ]
        ]
    },
    {
        "id": "ef047d4f.d9ac6",
        "type": "ui_button",
        "z": "ac631a6e.90e038",
        "name": "",
        "group": "d098c4a8.c19378",
        "order": 4,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Set O_1",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "Set O_1",
        "topicType": "str",
        "x": 260,
        "y": 320,
        "wires": [
            [
                "e4831b1f.a5a618"
            ]
        ]
    },
    {
        "id": "7b0e8ae1.98c404",
        "type": "debug",
        "z": "ac631a6e.90e038",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 590,
        "y": 320,
        "wires": []
    },
    {
        "id": "d098c4a8.c19378",
        "type": "ui_group",
        "name": "Kommandoer",
        "tab": "1ceb6d80.1f2613",
        "order": 3,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "1ceb6d80.1f2613",
        "type": "ui_tab",
        "name": "Hjem",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

Which version of the nodejs, Node-RED and dashboard nodes are you using ?
I just imported your flow into latest and I get 0, 1, 2 ok...

NodeJs 14.19.1
Node-red V1.3.4
Dashboard node 3.1.1

Best regards
Steffen

That is a very old version of node-red and not the latest node-red-dashboard. Are you able to upgrade?

I will do.
And will get back to you.

Best regards
Steffen

I updated Node-red to 3.0.2
And Dashboard to 3.2.0

Not until I updated Nodejs to 18.9.0 that it now shows the correct value.

Thanks a bunch!

Best regards.
Steffen

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