Multiple inputs, multiple variables to single output ( single string)

hi everyone
Pls find the flow attached below , instead of inject1 & inject 2 nodes i want to text input nodes or single ui form

[
{
"id": "e5aae51cd3f577c7",
"type": "tab",
"label": "Flow 11",
"disabled": false,
"info": "",
"env":
},
{
"id": "69db591dcf229454",
"type": "group",
"z": "e5aae51cd3f577c7",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"fc1f36eb4e7fd605",
"890e368018dea777",
"87f6971a4ab2090c",
"5daf7c74415a6831",
"2b09d2ec397649c5",
"a2f2cea4f94bdf90"
],
"x": 4,
"y": 79,
"w": 922,
"h": 202
},
{
"id": "fc1f36eb4e7fd605",
"type": "function",
"z": "e5aae51cd3f577c7",
"g": "69db591dcf229454",
"name": "Generate Label",
"func": "\n{\nvar variable1 = msg.payload1;\nvar variable2 = msg.payload2;\n\n msg.payload = "1=^XA^CI0 2=^FO100,25,0^BY12^BXN,7,200,20,20,1,_^FD"+variable1+"^FS 3=^FT300,110^CI0^A0N,42,45^FD"+variable2+"^FS 4=^XZ"\n \nreturn msg;\n}\nreturn msg;\n\n",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": ,
"x": 540,
"y": 180,
"wires": [
[
"890e368018dea777"
]
]
},
{
"id": "890e368018dea777",
"type": "debug",
"z": "e5aae51cd3f577c7",
"g": "69db591dcf229454",
"name": "debug 12",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 560,
"y": 240,
"wires":
},
{
"id": "87f6971a4ab2090c",
"type": "comment",
"z": "e5aae51cd3f577c7",
"g": "69db591dcf229454",
"name": "multiple variables through inject node multiple payload with join node",
"info": "",
"x": 660,
"y": 120,
"wires":
},
{
"id": "5daf7c74415a6831",
"type": "inject",
"z": "e5aae51cd3f577c7",
"g": "69db591dcf229454",
"name": "inject1",
"props": [
{
"p": "payload1",
"v": "hello",
"vt": "str"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 100,
"y": 140,
"wires": [
[
"a2f2cea4f94bdf90"
]
]
},
{
"id": "2b09d2ec397649c5",
"type": "inject",
"z": "e5aae51cd3f577c7",
"g": "69db591dcf229454",
"name": "",
"props": [
{
"p": "payload2",
"v": "world",
"vt": "str"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 100,
"y": 180,
"wires": [
[
"a2f2cea4f94bdf90"
]
]
},
{
"id": "a2f2cea4f94bdf90",
"type": "join",
"z": "e5aae51cd3f577c7",
"g": "69db591dcf229454",
"name": "",
"mode": "custom",
"build": "string",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\n",
"joinerType": "str",
"accumulate": false,
"timeout": "10",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 300,
"y": 160,
"wires": [
[
"fc1f36eb4e7fd605"
]
]
},
{
"id": "76bc1abd445c98a5",
"type": "ui_spacer",
"z": "e5aae51cd3f577c7",
"name": "spacer",
"group": "f93d8b7451631af8",
"order": 2,
"width": 6,
"height": 1
},
{
"id": "f93d8b7451631af8",
"type": "ui_group",
"name": "Default",
"tab": "bb1aaa5d8407907e",
"order": 1,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "bb1aaa5d8407907e",
"type": "ui_tab",
"name": "formentry",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]

Hi Pjlals

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json

The template node and ui-form should be all you need.
e.g.

[{"id":"5b49c64f6c756c55","type":"ui_form","z":"e5aae51cd3f577c7","name":"","label":"","group":"2d4fe667.28f8ba","order":15,"width":0,"height":0,"options":[{"label":"var1","value":"var1","type":"text","required":true,"rows":null},{"label":"var2","value":"var2","type":"text","required":true,"rows":null}],"formValue":{"var1":"","var2":""},"payload":"","submit":"submit","cancel":"cancel","topic":"topic","topicType":"msg","splitLayout":"","className":"","x":210,"y":160,"wires":[["cd40f40eaacf5518"]]},{"id":"cd40f40eaacf5518","type":"template","z":"e5aae51cd3f577c7","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"1=^XA^CI0 2=^FO100,25,0^BY12^BXN,7,200,20,20,1,_^FD{{{payload.var1}}}^FS 3=^FT300,110^CI0^A0N,42,45^FD{{{payload.var2}}}^FS 4=^XZ","output":"str","x":380,"y":160,"wires":[["890e368018dea777"]]},{"id":"890e368018dea777","type":"debug","z":"e5aae51cd3f577c7","name":"debug 12","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":160,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":2,"disp":true,"width":"18","collapse":false,"className":""},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

@E1cid thank u somuch , its working

@Buckskin thanks for explaning how to put a code in forum , noted

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