Dashboard Text Inputs to CSV

Hey, very new to Node Red but I'm trying to create a system where I can have multiple text fields produce a singular csv in the order of the inputs.

Example:
TexInputA: 1
TexInputB: 2
TexInputC: 3
Output: 1,2,3

I thought this would be as simple as using a join node but that doesn't quite solve my issue as the output is ordered based on when the text field's payload is sent. So in this case the output would function like:

Example:
TexInputB: 2
TexInputA: 1
TexInputC: 3
Output: 2,1,3
Desired Output: 1,2,3

Any help would be greatly appreciated!

are you using the CSV node & did you set headers in the columns field?

how is your join node set?

Here is one example how to use the join+csv node to get your desired output. You have 3 inject node for the value and one inject node for saying your join node to dump the data.

in the 3 inject node with the data a topic is set which match the column names of the csv output.

[{"id":"fbaad31a96c57451","type":"inject","z":"8722e064d8751792","name":"TexInputA","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"TexInputA","payload":"$floor($random() * 10)","payloadType":"jsonata","x":340,"y":120,"wires":[["1f9cf96437593ea6"]]},{"id":"8015d36038f3c535","type":"inject","z":"8722e064d8751792","name":"TexInputB","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"TexInputB","payload":"$floor($random() * 10)","payloadType":"jsonata","x":340,"y":180,"wires":[["1f9cf96437593ea6"]]},{"id":"20ede9e4e9d2f78d","type":"inject","z":"8722e064d8751792","name":"TexInputC","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"TexInputC","payload":"$floor($random() * 10)","payloadType":"jsonata","x":340,"y":240,"wires":[["1f9cf96437593ea6"]]},{"id":"b83b85c312d0266b","type":"join","z":"8722e064d8751792","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":630,"y":240,"wires":[["5c9727fdd6fa5b32","99fb7732339a93d1"]]},{"id":"d4b12c9b11f15605","type":"debug","z":"8722e064d8751792","name":"debug 12","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":980,"y":240,"wires":[]},{"id":"5c9727fdd6fa5b32","type":"csv","z":"8722e064d8751792","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"TexInputA,TexInputB,TexInputC","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":810,"y":240,"wires":[["d4b12c9b11f15605"]]},{"id":"99fb7732339a93d1","type":"debug","z":"8722e064d8751792","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":790,"y":160,"wires":[]},{"id":"43b73860a952d7e6","type":"inject","z":"8722e064d8751792","name":"complete","props":[{"p":"complete","v":"true","vt":"bool"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":440,"y":360,"wires":[["b83b85c312d0266b"]]},{"id":"1f9cf96437593ea6","type":"junction","z":"8722e064d8751792","x":480,"y":240,"wires":[["b83b85c312d0266b"]]}]

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