Hey guys,
i'm trying to block an empty input (debug says: NaN) of a text input node, so that u only can get a payload on debug if there was a number input of at least one number at the input node, confirmed through button use.
Here's my flow. Thx for any help.
btw: sry for my bad english.
[
{
"id": "6c3072aefaf68405",
"type": "tab",
"label": "Testflow",
"disabled": false,
"info": "",
"env": []
},
{
"id": "058fb7e7e0b63923",
"type": "ui_text_input",
"z": "6c3072aefaf68405",
"name": "Input",
"label": "",
"tooltip": "",
"group": "72303c1.198bdc4",
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "Code",
"sendOnBlur": true,
"className": "",
"topicType": "str",
"x": 170,
"y": 340,
"wires": [
[
"5d91137742d5db32"
]
]
},
{
"id": "6001d4789d59be26",
"type": "ui_button",
"z": "6c3072aefaf68405",
"name": "Button",
"group": "72303c1.198bdc4",
"order": 2,
"width": 0,
"height": 0,
"passthru": false,
"label": "OK",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "OK",
"payloadType": "str",
"topic": "Button",
"topicType": "str",
"x": 170,
"y": 280,
"wires": [
[
"f8c5bcfe904a4e36"
]
]
},
{
"id": "f8c5bcfe904a4e36",
"type": "change",
"z": "6c3072aefaf68405",
"name": "",
"rules": [
{
"t": "set",
"p": "complete",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 460,
"y": 280,
"wires": [
[
"5d91137742d5db32"
]
]
},
{
"id": "5d91137742d5db32",
"type": "join",
"z": "6c3072aefaf68405",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 610,
"y": 340,
"wires": [
[
"7e4faf41bb215ed1",
"262ad0a7e971897b"
]
]
},
{
"id": "262ad0a7e971897b",
"type": "change",
"z": "6c3072aefaf68405",
"name": "input reset",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "null",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 190,
"y": 400,
"wires": [
[
"058fb7e7e0b63923"
]
]
},
{
"id": "7e4faf41bb215ed1",
"type": "debug",
"z": "6c3072aefaf68405",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 810,
"y": 340,
"wires": []
},
{
"id": "72303c1.198bdc4",
"type": "ui_group",
"name": "Default",
"tab": "d50f4120.5bc2d",
"order": 1,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "d50f4120.5bc2d",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]