Hi, I want to display an entered number on text ONLY WHEN I click on the button, do I have to use the function node? It did'nt work
[
{
"id": "496670a68851d55b",
"type": "ui_button",
"z": "70c25f2d579744c7",
"name": "",
"group": "461e2ece4e14a1f0",
"order": 2,
"width": 0,
"height": 0,
"passthru": false,
"label": "button",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "OK",
"payloadType": "str",
"topic": "b",
"topicType": "str",
"x": 110,
"y": 220,
"wires": [
[
"aff2e90292aa288f"
]
]
},
{
"id": "b8f19620b704f38f",
"type": "ui_text",
"z": "70c25f2d579744c7",
"group": "461e2ece4e14a1f0",
"order": 2,
"width": 0,
"height": 0,
"name": "",
"label": "text",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 590,
"y": 320,
"wires": []
},
{
"id": "9f9380053f8d3a5c",
"type": "ui_text_input",
"z": "70c25f2d579744c7",
"name": "",
"label": "",
"tooltip": "",
"group": "461e2ece4e14a1f0",
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "a",
"sendOnBlur": true,
"topicType": "str",
"x": 130,
"y": 340,
"wires": [
[
"aff2e90292aa288f"
]
]
},
{
"id": "1f986cdba2ce2069",
"type": "debug",
"z": "70c25f2d579744c7",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 570,
"y": 260,
"wires": []
},
{
"id": "aff2e90292aa288f",
"type": "function",
"z": "70c25f2d579744c7",
"name": "",
"func": "if (msg.payload.b === \"OK\") {\n msg.payload = msg.payload.a\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 280,
"wires": [
[
"1f986cdba2ce2069",
"b8f19620b704f38f"
]
]
},
{
"id": "461e2ece4e14a1f0",
"type": "ui_group",
"name": "Group 1",
"tab": "ea5e7575d0f9638f",
"order": 1,
"disp": true,
"width": 6
},
{
"id": "ea5e7575d0f9638f",
"type": "ui_tab",
"name": "Tab 6",
"icon": "dashboard",
"order": 6
}
]