Hi ya'll,
i got a data table in this flow im gonna post, and i wanted a column for the date and time (with minutes and seconds) when you clicked the send button, but something doesnt work. Can someone help me getz it right please? That would be really cool.
And also, is it possible to create a textfield where you type something in and like right next to it you click a "+" button and it creates a new textfield in the dashboard right under it?
Here is my code for the flow:
[
{
"id": "e23b1ec257b976f3",
"type": "tab",
"label": "fen20",
"disabled": false,
"info": "",
"env": []
},
{
"id": "4eb82b6fd181084b",
"type": "group",
"z": "e23b1ec257b976f3",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"2a0f49a8a6b25003",
"59f255548139d61b",
"3ea931666aad88de",
"a8edde5f8b770cf2",
"b9def1e4d44943e9",
"0ad38ad245feed45",
"17d5174f0392e835",
"0e20b4d1f51abc28",
"5e18b798f55f0a4a",
"1a46176fbd7c448d",
"eeccd7be8436bcfb",
"48455babc1e963f2",
"e89e5cd4dc03fca0",
"cb6de8cf3675b3d3",
"a291f4f714cd72d5",
"121819121e84181c",
"79f9356a09d9cb47",
"268e39657606367d"
],
"x": 14,
"y": 39,
"w": 1232,
"h": 362
},
{
"id": "2a0f49a8a6b25003",
"type": "change",
"z": "e23b1ec257b976f3",
"d": true,
"g": "4eb82b6fd181084b",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "payload.shift",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 300,
"y": 260,
"wires": [
[
"3ea931666aad88de"
]
]
},
{
"id": "59f255548139d61b",
"type": "ui-dropdown",
"z": "e23b1ec257b976f3",
"d": true,
"g": "4eb82b6fd181084b",
"group": "0dab66fce8695736",
"name": "shift",
"label": "Schicht:",
"tooltip": "",
"order": 3,
"width": 0,
"height": 0,
"passthru": false,
"multiple": false,
"options": [
{
"label": "",
"value": "Frühschicht",
"type": "str"
},
{
"label": "",
"value": "Spätschicht",
"type": "str"
},
{
"label": "",
"value": "Nachtschicht",
"type": "str"
},
{
"label": "",
"value": "Tagschicht",
"type": "str"
}
],
"payload": "",
"topic": "shift",
"topicType": "str",
"className": "",
"x": 90,
"y": 260,
"wires": [
[
"2a0f49a8a6b25003"
]
]
},
{
"id": "3ea931666aad88de",
"type": "join",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "",
"mode": "custom",
"build": "merged",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": true,
"timeout": "",
"count": "7",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 490,
"y": 220,
"wires": [
[
"17d5174f0392e835"
]
]
},
{
"id": "a8edde5f8b770cf2",
"type": "ui-form",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "fendaten",
"group": "0dab66fce8695736",
"label": "",
"order": 4,
"width": 0,
"height": 0,
"options": [
{
"label": "Mitarbeiter",
"key": "mitarbeiter",
"type": "dropdown",
"required": true,
"rows": null
},
{
"label": "Maschine",
"key": "maschine",
"type": "dropdown",
"required": true,
"rows": null
},
{
"label": "Schicht",
"key": "Schicht",
"type": "dropdown",
"required": true,
"rows": null
},
{
"label": "FA",
"key": "fa_number",
"type": "text",
"required": true,
"rows": null
},
{
"label": "Charge-Rohwickel",
"key": "cal_chargenr",
"type": "text",
"required": true,
"rows": null
},
{
"label": "Charge-Fertigwickel",
"key": "notch_chargenr",
"type": "text",
"required": false,
"rows": null
},
{
"label": "Gut (Stanzungen)",
"key": "ok_amount",
"type": "number",
"required": false,
"rows": null
},
{
"label": "Ausschuss (Stanzungen)",
"key": "nok_amount",
"type": "number",
"required": false,
"rows": null
},
{
"label": "Gebucht",
"key": "booked",
"type": "checkbox",
"required": false,
"rows": null
}
],
"formValue": {
"mitarbeiter": "",
"maschine": "",
"Schicht": "",
"fa_number": "",
"cal_chargenr": "",
"notch_chargenr": "",
"ok_amount": "",
"nok_amount": "",
"booked": false
},
"payload": "",
"submit": "Absenden",
"cancel": "Abbrechen",
"resetOnSubmit": false,
"topic": "fendaten",
"topicType": "str",
"splitLayout": "",
"className": "",
"dropdownOptions": [
{
"dropdown": "maschine",
"value": "FEN21",
"label": "FEN21"
},
{
"dropdown": "maschine",
"value": "FEN22",
"label": "FEN22"
},
{
"dropdown": "maschine",
"value": "FEN23",
"label": "FEN23"
},
{
"dropdown": "Schicht",
"value": "Frühschicht",
"label": "Frühschicht"
},
{
"dropdown": "Schicht",
"value": "Spätschicht",
"label": "Spätschicht"
},
{
"dropdown": "Schicht",
"value": "Nachtschicht",
"label": "Nachtschicht"
},
{
"dropdown": "Schicht",
"value": "Tagschicht",
"label": "Tagschicht"
},
{
"dropdown": "mitarbeiter",
"value": "ali.celik",
"label": "ali.celik"
},
{
"dropdown": "mitarbeiter",
"value": "alexander.baumtrok",
"label": "alexander.baumtrok"
},
{
"dropdown": "mitarbeiter",
"value": "alexander.brozmann",
"label": "alexander.brozmann"
},
{
"dropdown": "mitarbeiter",
"value": "andreas.lorenz",
"label": "andreas.lorenz"
},
{
"dropdown": "mitarbeiter",
"value": "arman.vakili",
"label": "arman.vakili"
},
{
"dropdown": "mitarbeiter",
"value": "baturay.sener",
"label": "baturay.sener"
},
{
"dropdown": "mitarbeiter",
"value": "chi-khang.nguyen",
"label": "chi-khang.nguyen"
},
{
"dropdown": "mitarbeiter",
"value": "daniel.wiss",
"label": "daniel.wiss"
},
{
"dropdown": "mitarbeiter",
"value": "dimitri.hermann",
"label": "dimitri.hermann"
},
{
"dropdown": "mitarbeiter",
"value": "dominik.krklec",
"label": "dominik.krklec"
},
{
"dropdown": "mitarbeiter",
"value": "eduard.ditz",
"label": "eduard.ditz"
},
{
"dropdown": "mitarbeiter",
"value": "ernst.fil",
"label": "ernst.fil"
},
{
"dropdown": "mitarbeiter",
"value": "florian.heiler",
"label": "florian.heiler"
},
{
"dropdown": "mitarbeiter",
"value": "haris.keskinovic",
"label": "haris.keskinovic"
},
{
"dropdown": "mitarbeiter",
"value": "harrie.jung",
"label": "harrie.jung"
},
{
"dropdown": "mitarbeiter",
"value": "igor.kappes",
"label": "igor.kappes"
},
{
"dropdown": "mitarbeiter",
"value": "jewgeni.kultenko",
"label": "jewgeni.kultenko"
},
{
"dropdown": "mitarbeiter",
"value": "johannes.kammerzell",
"label": "johannes.kammerzell"
},
{
"dropdown": "mitarbeiter",
"value": "klaus.baechle",
"label": "klaus.baechle"
},
{
"dropdown": "mitarbeiter",
"value": "matthias.mompas",
"label": "matthias.mompas"
},
{
"dropdown": "mitarbeiter",
"value": "metin.tosun",
"label": "metin.tosun"
},
{
"dropdown": "mitarbeiter",
"value": "mehmet.incili",
"label": "mehmet.incili"
},
{
"dropdown": "mitarbeiter",
"value": "michael.sanders",
"label": "michael.sanders"
},
{
"dropdown": "mitarbeiter",
"value": "michael.woschek",
"label": "michael.woschek"
},
{
"dropdown": "mitarbeiter",
"value": "negjdet.berisha",
"label": "negjdet.berisha"
},
{
"dropdown": "mitarbeiter",
"value": "nikolai.fedotow",
"label": "nikolai.fedotow"
},
{
"dropdown": "mitarbeiter",
"value": "pavol.bucko",
"label": "pavol.bucko"
},
{
"dropdown": "mitarbeiter",
"value": "samuel.laval",
"label": "samuel.laval"
},
{
"dropdown": "mitarbeiter",
"value": "stefan.leonte",
"label": "stefan.leonte"
},
{
"dropdown": "mitarbeiter",
"value": "sven.neunzig",
"label": "sven.neunzig"
},
{
"dropdown": "mitarbeiter",
"value": "thomas.bauer",
"label": "thomas.bauer"
}
],
"x": 140,
"y": 360,
"wires": [
[
"3ea931666aad88de"
]
]
},
{
"id": "b9def1e4d44943e9",
"type": "change",
"z": "e23b1ec257b976f3",
"d": true,
"g": "4eb82b6fd181084b",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "payload.machine",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 300,
"y": 220,
"wires": [
[
"3ea931666aad88de"
]
]
},
{
"id": "0ad38ad245feed45",
"type": "change",
"z": "e23b1ec257b976f3",
"d": true,
"g": "4eb82b6fd181084b",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "payload.mitarbeiter",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 300,
"y": 180,
"wires": [
[
"3ea931666aad88de"
]
]
},
{
"id": "17d5174f0392e835",
"type": "switch",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "fendaten",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 630,
"y": 220,
"wires": [
[
"1a46176fbd7c448d"
]
]
},
{
"id": "0e20b4d1f51abc28",
"type": "ui-dropdown",
"z": "e23b1ec257b976f3",
"d": true,
"g": "4eb82b6fd181084b",
"group": "0dab66fce8695736",
"name": "machine",
"label": "Maschine:",
"tooltip": "",
"order": 2,
"width": 0,
"height": 0,
"passthru": true,
"multiple": false,
"options": [
{
"label": "",
"value": "FEN21",
"type": "str"
},
{
"label": "",
"value": "FEN22",
"type": "str"
},
{
"label": "",
"value": "FEN23",
"type": "str"
}
],
"payload": "",
"topic": "machine",
"topicType": "str",
"className": "",
"x": 100,
"y": 220,
"wires": [
[
"b9def1e4d44943e9"
]
]
},
{
"id": "5e18b798f55f0a4a",
"type": "ui-dropdown",
"z": "e23b1ec257b976f3",
"d": true,
"g": "4eb82b6fd181084b",
"group": "0dab66fce8695736",
"name": "mitarbeiter",
"label": "Mitarbeiter",
"tooltip": "",
"order": 1,
"width": 0,
"height": 0,
"passthru": false,
"multiple": false,
"chips": false,
"clearable": false,
"options": [
{
"label": "",
"value": "Abdullah Terzi",
"type": "str"
},
{
"label": "",
"value": "Alexander Baumtrok",
"type": "str"
},
{
"label": "",
"value": "Alexander Brozmann",
"type": "str"
},
{
"label": "",
"value": "Ali Celik",
"type": "str"
},
{
"label": "",
"value": "Andreas Lorenz",
"type": "str"
},
{
"label": "",
"value": "Arman Vakili",
"type": "str"
},
{
"label": "",
"value": "Baturay Sener",
"type": "str"
},
{
"label": "",
"value": "Chi-Khang Nguyen",
"type": "str"
},
{
"label": "",
"value": "Daniel Wiss",
"type": "str"
},
{
"label": "",
"value": "Dimitri Hermann",
"type": "str"
},
{
"label": "",
"value": "Dominik Krklec",
"type": "str"
},
{
"label": "",
"value": "Eduard Ditz",
"type": "str"
},
{
"label": "",
"value": "Ernst Fil",
"type": "str"
},
{
"label": "",
"value": "Florian Heiler",
"type": "str"
},
{
"label": "",
"value": "Haris Keskinovic",
"type": "str"
},
{
"label": "",
"value": "Harrie Jung",
"type": "str"
},
{
"label": "",
"value": "Igor Kappes",
"type": "str"
},
{
"label": "",
"value": "Jewgeni Kultenko",
"type": "str"
},
{
"label": "",
"value": "Johannes Kammerzell",
"type": "str"
},
{
"label": "",
"value": "Klaus Bächle",
"type": "str"
},
{
"label": "",
"value": "Matthias Mompas",
"type": "str"
},
{
"label": "",
"value": "Metin Tosun",
"type": "str"
},
{
"label": "",
"value": "Mehmet Incili",
"type": "str"
},
{
"label": "",
"value": "Michael Sanders",
"type": "str"
},
{
"label": "",
"value": "Michael Woschek",
"type": "str"
},
{
"label": "",
"value": "Negjdet Berisha",
"type": "str"
},
{
"label": "",
"value": "Nicolai Fedotow",
"type": "str"
},
{
"label": "",
"value": "Pavol Bucko",
"type": "str"
},
{
"label": "",
"value": "Samuel Laval",
"type": "str"
},
{
"label": "",
"value": "Stefan Leonte",
"type": "str"
},
{
"label": "",
"value": "Sven Neunzig",
"type": "str"
},
{
"label": "",
"value": "Thomas Bauer",
"type": "str"
}
],
"payload": "",
"topic": "mitarbeiter",
"topicType": "str",
"className": "",
"typeIsComboBox": true,
"x": 110,
"y": 180,
"wires": [
[
"0ad38ad245feed45"
]
]
},
{
"id": "1a46176fbd7c448d",
"type": "change",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "payload[0]",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 840,
"y": 220,
"wires": [
[
"48455babc1e963f2",
"eeccd7be8436bcfb"
]
]
},
{
"id": "eeccd7be8436bcfb",
"type": "ui-table",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"group": "eb5e8d5cc746c36b",
"name": "datenanzeige",
"order": 1,
"width": "0",
"height": "0",
"maxrows": "15",
"autocols": true,
"showSearch": true,
"selectionType": "click",
"columns": [],
"mobileBreakpoint": "sm",
"mobileBreakpointType": "defaults",
"action": "append",
"x": 1130,
"y": 220,
"wires": [
[]
]
},
{
"id": "48455babc1e963f2",
"type": "debug",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "debug 2565",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1130,
"y": 100,
"wires": []
},
{
"id": "e89e5cd4dc03fca0",
"type": "template",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "CREATE TABLE",
"field": "topic",
"fieldType": "msg",
"format": "sql",
"syntax": "mustache",
"template": "CREATE TABLE IF NOT EXISTS fen20_log_book (\n id INT AUTO_INCREMENT PRIMARY KEY COMMENT 'Unique identifier for each record, auto-incremented',\n Mitarbeiter VARCHAR(30)\n fa_number VARCHAR(7) COMMENT 'FA number, indexed for faster searches',\n cal_chargenr VARCHAR(30) COMMENT 'Calibration charge number, indexed for faster searches',\n notch_chargenr VARCHAR(30) UNIQUE COMMENT 'Notch charge number, must be unique and is indexed',\n ok_amount INT COMMENT 'Amount of OK (acceptable quality) items',\n nok_amount INT COMMENT 'Amount of NOK (not acceptable quality) items',\n booked VARCHAR (30) 'Checkbox if booked or not'\n employee VARCHAR(50) COMMENT 'Name of the employee, indexed for faster searches',\n shift VARCHAR(30) COMMENT 'Shift during which the record was made, indexed for faster searches',\n maschine VARCHAR(10) COMMENT 'Machine used for the production, indexed for faster searches',\n registration_timestamp TIMESTAMP DEFAULT (CURRENT_TIMESTAMP) COMMENT 'Timestamp of when the record was initially registered',\n booking_timestamp TIMESTAMP DEFAULT COMMENT 'Timestamp of when the booking was made',\n last_update TIMESTAMP DEFAULT COMMENT 'Timestamp of the last update to the record, null upon insertion',\n INDEX (registration_timestamp),\n INDEX (machine),\n INDEX (Mitarbeiter),\n INDEX (fa_number), \n INDEX (cal_chargenr), \n INDEX (notch_chargenr),\n INDEX (ok_amount),\n INDEX (nok_amount),\n INDEX (booked),\n INDEX (employee),\n INDEX (shift),\n\n);\n",
"output": "str",
"x": 620,
"y": 360,
"wires": [
[
"121819121e84181c"
]
]
},
{
"id": "cb6de8cf3675b3d3",
"type": "inject",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 400,
"y": 360,
"wires": [
[
"e89e5cd4dc03fca0"
]
]
},
{
"id": "a291f4f714cd72d5",
"type": "debug",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "debug 2566",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1070,
"y": 360,
"wires": []
},
{
"id": "121819121e84181c",
"type": "mysql",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "",
"x": 850,
"y": 360,
"wires": [
[
"a291f4f714cd72d5"
]
]
},
{
"id": "79f9356a09d9cb47",
"type": "inject",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "Create fake DB",
"props": [
{
"p": "payload"
},
{
"p": "faketable",
"v": "[{\"Mitarbeiter\":\"DHe\",\"Parameter\":2},{\"Mitarbeiter\":\"DHe\",\"Parameter\":4},{\"Mitarbeiter\":\"DHe\",\"Parameter\":5}]",
"vt": "json"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 380,
"y": 80,
"wires": [
[
"268e39657606367d"
]
]
},
{
"id": "268e39657606367d",
"type": "change",
"z": "e23b1ec257b976f3",
"g": "4eb82b6fd181084b",
"name": "",
"rules": [
{
"t": "set",
"p": "faketable",
"pt": "flow",
"to": "faketable",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 610,
"y": 80,
"wires": [
[]
]
},
{
"id": "0dab66fce8695736",
"type": "ui-group",
"name": "fen20",
"page": "e6d4daf71da027b7",
"width": "6",
"height": "1",
"order": 1,
"showTitle": true,
"className": "",
"visible": true,
"disabled": "false"
},
{
"id": "eb5e8d5cc746c36b",
"type": "ui-group",
"name": "fendaten",
"page": "e6d4daf71da027b7",
"width": "6",
"height": "1",
"order": 2,
"showTitle": true,
"className": "",
"visible": "true",
"disabled": "false"
},
{
"id": "e6d4daf71da027b7",
"type": "ui-page",
"name": "fen20",
"ui": "8ced774a3726a8f8",
"path": "/fentest",
"icon": "home",
"layout": "grid",
"theme": "e5f95f025b9233a2",
"breakpoints": [
{
"name": "Default",
"px": "0",
"cols": "3"
},
{
"name": "Tablet",
"px": "576",
"cols": "6"
},
{
"name": "Small Desktop",
"px": "768",
"cols": "9"
},
{
"name": "Desktop",
"px": "1024",
"cols": "12"
}
],
"order": 4,
"className": "",
"visible": "true",
"disabled": "false"
},
{
"id": "8ced774a3726a8f8",
"type": "ui-base",
"name": "UI Name",
"path": "/dashboard",
"includeClientData": true,
"acceptsClientConfig": [
"ui-notification",
"ui-control"
],
"showPathInSidebar": false,
"showPageTitle": true,
"navigationStyle": "default",
"titleBarStyle": "default"
},
{
"id": "e5f95f025b9233a2",
"type": "ui-theme",
"name": "lc grafana",
"colors": {
"surface": "#5c5c5c",
"primary": "#00f000",
"bgPage": "#3e3e3e",
"groupBg": "#535353",
"groupOutline": "#ffffff"
},
"sizes": {
"density": "default",
"pagePadding": "12px",
"groupGap": "12px",
"groupBorderRadius": "4px",
"widgetGap": "12px"
}
}
]