I'm using this dashboard function along with Forms to marry 3 sets of data. I have the numeric input (Dips) set to only select 1, 2, or 3. Then the Scan Info (dashboard: forms) is just collecting data from 2 QR codes. For the first attempt, I'll select the numeric info first then scan the two QR codes and I'll get the results I want. For following inputs, all I'm supposed to do is scan the 2 QR codes and it should still marry whatever I selected for the numeric input but it's not. It's undefined. I have to go to the up/down selector to have the value reset and then it'll work again. I prefer to not have to do that. Is there a way to hold the numeric value for subsequent inputs without having to mess with it? Thanks.
Hi,
You may need to post the actual code for the nodes you posted above.
At the very least the code from the function
node.
[
{
"id": "9b04fbf83e08a815",
"type": "tab",
"label": "Monorail Load Station 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "a7cdac1e00d3c86d",
"type": "ui_numeric",
"z": "9b04fbf83e08a815",
"name": "",
"label": "Dips",
"tooltip": "",
"group": "dc723265ea170c82",
"order": 2,
"width": 0,
"height": 0,
"wrap": false,
"passthru": false,
"topic": "dips",
"topicType": "msg",
"format": "{{value}}",
"min": "1",
"max": "3",
"step": 1,
"className": "",
"x": 370,
"y": 160,
"wires": [
[
"a4f254990a7da987"
]
]
},
{
"id": "7e01b4883c297b48",
"type": "ui_form",
"z": "9b04fbf83e08a815",
"name": "",
"label": "Scan Information",
"group": "dc723265ea170c82",
"order": 3,
"width": 0,
"height": 0,
"options": [
{
"label": "QAS Barcode",
"value": "qas_bc",
"type": "text",
"required": true,
"rows": null
},
{
"label": "Hanger Barcode",
"value": "hanger_bc",
"type": "number",
"required": true,
"rows": null
}
],
"formValue": {
"qas_bc": "",
"hanger_bc": ""
},
"payload": "",
"submit": "Submit",
"cancel": "Clear",
"topic": "topic",
"topicType": "msg",
"splitLayout": false,
"className": "",
"x": 410,
"y": 120,
"wires": [
[
"094cf976c9f8f5f9"
]
]
},
{
"id": "bee9f2b03aa8e640",
"type": "debug",
"z": "9b04fbf83e08a815",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1020,
"y": 120,
"wires": []
},
{
"id": "125e5cb3f96a19da",
"type": "function",
"z": "9b04fbf83e08a815",
"name": "function 1",
"func": "msg.payload = {\n\n \"qas_barcode\": msg.payload.qas_bc,\n \"hanger_barcode\": msg.payload.hanger_bc,\n \"dips\": msg.payload.dips\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 880,
"y": 120,
"wires": [
[
"bee9f2b03aa8e640"
]
]
},
{
"id": "a4f254990a7da987",
"type": "change",
"z": "9b04fbf83e08a815",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "payload.dips",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 550,
"y": 160,
"wires": [
[
"094cf976c9f8f5f9"
]
]
},
{
"id": "094cf976c9f8f5f9",
"type": "join",
"z": "9b04fbf83e08a815",
"name": "",
"mode": "custom",
"build": "merged",
"property": "payload",
"propertyType": "msg",
"key": "payload.dips",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "num",
"reduceFixup": "",
"x": 730,
"y": 120,
"wires": [
[
"125e5cb3f96a19da"
]
]
},
{
"id": "dc723265ea170c82",
"type": "ui_group",
"name": "Monorail Load",
"tab": "1a2913bf1bb8cd21",
"order": 1,
"disp": true,
"width": "10",
"collapse": false,
"className": ""
},
{
"id": "1a2913bf1bb8cd21",
"type": "ui_tab",
"name": "Monorail Load Station 1",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
Thanks, but I may need to know a bit more on how to use the code.
I don't have a barcode scanner.
Oh, ok. I did see a couple of messages with undefined
in them, but can't now get them to happen again.
So I can't say much more on what the problem is.
I do want to help, but I seem to be stuck.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.