Create .CSV and .txt from a table

Hi everyone,

[{"id":"ab3ee0589c3e8b29","type":"ui_template","z":"9d82413d96f85954","group":"21bd4d782123bfb3","name":"funciona_perfecto_v3_registry","order":3,"width":8,"height":10,"format":"<p><strong>Report log:</strong></p>\n<table style=\"border-collapse: collapse; font-size: 13px; font-weight: bold ;margin-top: 20px; height: 1000px;\" border=\"1\">\n  <tbody>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>PRODUCT NAME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.productName}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>PRODUCT NUMBER</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.productNumber}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>DATE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.date}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>START TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.startTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>END TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.endTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>CYCLE TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.cycleTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>PAUSE TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.pauseTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>TANK 1 TOTAL</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.tank1Total}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>TANK 2 TOTAL</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.tank2Total}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MINIMUM AIR TEMPERATURE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.minAirTemperature}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MEDIUM AIR TEMPERATURE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.mediumAirTemperature}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM AIR TEMPERATURE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.maxAirTemperature}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MINIMUM FLOW</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.minFlow}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MEDIUM FLOW</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.mediumFlow}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM FLOW</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.maxFlow}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MINIMUM HUMIDITY</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.minHumidity}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MEDIUM HUMIDITY</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.mediumHumidity}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM HUMIDITY</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.maxHumidity}}</td>\n    </tr>\n  </tbody>\n</table>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":790,"y":160,"wires":[[]]},{"id":"21bd4d782123bfb3","type":"ui_group","name":"registry","tab":"ab1ada9da2ce8e76","order":1,"disp":false,"width":"25","collapse":false,"className":""},{"id":"ab1ada9da2ce8e76","type":"ui_tab","name":"REGISTRY","icon":"dashboard","order":13,"disabled":false,"hidden":true}]

How can I make with this node the same table in .csv or .txt in a folder inside the iot, I use the WinSCP program.

Thank you very much

what have you tried? All you have provided is a ui-template node which doesn't tell us much

The flow would be the following,

[{"id":"2493d0f1b4d72d1b","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"76460868d3713d74","type":"s7 in","z":"2493d0f1b4d72d1b","endpoint":"0f29c96eb80de212","mode":"all","variable":"COATEC: Product_Name","diff":true,"name":"","x":390,"y":200,"wires":[["388c8d8f28a47fe1"]]},{"id":"388c8d8f28a47fe1","type":"function","z":"2493d0f1b4d72d1b","name":"funciona_perfecto_v3","func":"var productName = msg.payload['COATEC: Product_Name'];\nvar productNumber = msg.payload['COATEC: Product_Number'];\nvar reportDateMonth = msg.payload['COATEC: Report.Date.Month'];\nvar reportDateYear = msg.payload['COATEC: Report.Date.Year'];\nvar reportDateDay = msg.payload['COATEC: Report.Date.Day'];\nvar date = msg.payload.date || (reportDateMonth + '/' + reportDateDay + '/' + reportDateYear);\nvar reportStartHour = msg.payload['COATEC: Report.Start.Hour'];\nvar reportStartMinute = msg.payload['COATEC: Report.Start.Minute'];\nvar startTime = msg.payload.startTime || (reportStartHour + ' : ' + reportStartMinute);\nvar reportEndHour = msg.payload['COATEC: Report.End.Hour'];\nvar reportEndMinute = msg.payload['COATEC: Report.End.Minute'];\nvar endTime = msg.payload.endTime || (reportEndHour + ' : ' + reportEndMinute);\nvar TotalHours = msg.payload['COATEC: Total_Hours'];\nvar TotalSeconds = msg.payload['COATEC: Total_Seconds'];\nvar TotalMinutes = msg.payload['COATEC: Total_Minutes'];\nvar cycleTime = msg.payload.cycleTime || (TotalHours + ' : ' + TotalMinutes + ' : ' + TotalSeconds);\nvar pauseTotalHours = msg.payload['COATEC: Total_Hours_Pause'];\nvar pauseTotalMinutes = msg.payload['COATEC: Total_Minutes_Pause'];\nvar pauseTotalSeconds = msg.payload['COATEC: Total_Seconds_Pause'];\nvar pauseTime = msg.payload.pauseTime || (pauseTotalHours + ' : ' + pauseTotalMinutes + ' : ' + pauseTotalSeconds);\nvar tank1Total = msg.payload['COATEC: Total_Tank_1'] + \" kg\";\nvar tank2Total = msg.payload['COATEC: Total_Tank_2'] + \" kg\";\nvar minAirTemperature = (parseFloat(msg.payload['COATEC: Minimum_Air_Temperature']) / 10).toFixed(1).replace('.', ',');\nvar mediumAirTemperature = (parseFloat(msg.payload['COATEC: Medium_Air_Temperature']) / 10).toFixed(1).replace('.', ',');\nvar maxAirTemperature = (parseFloat(msg.payload['COATEC: Maximum_Air_Temperature']) / 10).toFixed(1).replace('.', ',');\nvar minFlow = parseInt(msg.payload['COATEC: Minimum_Flow']);\nvar mediumFlow = parseInt(msg.payload['COATEC: Medium_Flow']);\nvar maxFlow = parseInt(msg.payload['COATEC: Maximum_Flow']);\nvar minHumidity = (parseFloat(msg.payload['COATEC: Minimum_Humidity']) / 10).toFixed(1).replace('.',\",\");\nvar mediumHumidity = (parseFloat(msg.payload['COATEC: Medium_Humidity']) / 10).toFixed(1).replace('.',\",\");\nvar maxHumidity = (parseFloat(msg.payload['COATEC: Maximum_Humidity']) / 10).toFixed(1).replace('.',\",\");\n\nmsg.productName = productName;\nmsg.productNumber = productNumber;\nmsg.date = date;\nmsg.startTime = startTime;\nmsg.endTime = endTime;\nmsg.cycleTime = cycleTime;\nmsg.pauseTime = pauseTime;\nmsg.tank1Total = tank1Total;\nmsg.tank2Total = tank2Total;\nmsg.minAirTemperature = \"+\" + minAirTemperature + \" ºC\";\nmsg.mediumAirTemperature = \"+\" + mediumAirTemperature + \" ºC\";\nmsg.maxAirTemperature = \"+\" + maxAirTemperature + \" ºC\";\nmsg.minFlow = \"+\" + minFlow + \" m3/h\";\nmsg.mediumFlow = \"+\" + mediumFlow + \" m3/h\";\nmsg.maxFlow = \"+\" + maxFlow + \" m3/h\";\nmsg.minHumidity = \"+\" + minHumidity + \" g/kg\";\nmsg.mediumHumidity = \"+\" + mediumHumidity + \" g/kg\";\nmsg.maxHumidity = \"+\" + maxHumidity + \" g/kg\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":200,"wires":[["99b5b4494ee48de6"]]},{"id":"99b5b4494ee48de6","type":"ui_template","z":"2493d0f1b4d72d1b","group":"ca2bf62245caf5ae","name":"funciona_perfecto_v4","order":3,"width":8,"height":10,"format":"<p><strong>Work report:</strong></p>\n<table style=\"border-collapse: collapse; font-size: 13px; font-weight: bold ;margin-top: 20px; height: 1000px;\" border=\"1\">\n  <tbody>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>PRODUCT NAME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.productName}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>PRODUCT NUMBER</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.productNumber}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>DATE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.date}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>START TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.startTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>END TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.endTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>CYCLE TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.cycleTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>PAUSE TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.pauseTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>TANK 1 TOTAL</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.tank1Total}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>TANK 2 TOTAL</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.tank2Total}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MINIMUM AIR TEMPERATURE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.minAirTemperature}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MEDIUM AIR TEMPERATURE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.mediumAirTemperature}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM AIR TEMPERATURE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.maxAirTemperature}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MINIMUM FLOW</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.minFlow}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MEDIUM FLOW</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.mediumFlow}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM FLOW</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.maxFlow}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MINIMUM HUMIDITY</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.minHumidity}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MEDIUM HUMIDITY</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.mediumHumidity}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM HUMIDITY</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.maxHumidity}}</td>\n    </tr>\n  </tbody>\n</table>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":920,"y":200,"wires":[[]]},{"id":"0f29c96eb80de212","type":"s7 endpoint","transport":"iso-on-tcp","address":"192.168.250.55","port":"102","rack":"0","slot":"1","localtsaphi":"01","localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-slot","adapter":"","busaddr":"2","cycletime":"1000","timeout":"2000","name":"PLC_1_COATEC_(REPORTS)","vartable":[{"addr":"DB300,S8.30","name":"COATEC: Product_Name"},{"addr":"DB300,R40","name":"COATEC: Product_Number"},{"addr":"DB300,WORD0","name":"COATEC: Report.Date.Year"},{"addr":"DB300,I44","name":"COATEC: Total_Hours"},{"addr":"DB300,I46","name":"COATEC: Total_Seconds"},{"addr":"DB300,I48","name":"COATEC: Total_Minutes"},{"addr":"DB300,I54","name":"COATEC: Total_Hours_Pause"},{"addr":"DB300,I56","name":"COATEC: Total_Minutes_Pause"},{"addr":"DB300,I58","name":"COATEC: Total_Seconds_Pause"},{"addr":"DB300,I50","name":"COATEC: Total_Tank_1"},{"addr":"DB300,I52","name":"COATEC: Total_Tank_2"},{"addr":"DB300,I60","name":"COATEC: Minimum_Air_Temperature"},{"addr":"DB300,I62","name":"COATEC: Maximum_Air_Temperature"},{"addr":"DB300,I64","name":"COATEC: Medium_Air_Temperature"},{"addr":"DB300,R72","name":"COATEC: Minimum_Flow"},{"addr":"DB300,R76","name":"COATEC: Maximum_Flow"},{"addr":"DB300,R80","name":"COATEC: Medium_Flow"},{"addr":"DB300,I66","name":"COATEC: Minimum_Humidity"},{"addr":"DB300,I68","name":"COATEC: Maximum_Humidity"},{"addr":"DB300,I70","name":"COATEC: Medium_Humidity"},{"addr":"DB300,B2","name":"COATEC: Report.Date.Day"},{"addr":"DB300,B3","name":"COATEC: Report.Date.Month"},{"addr":"DB300,B4","name":"COATEC: Report.Start.Hour"},{"addr":"DB300,B5","name":"COATEC: Report.Start.Minute"},{"addr":"DB300,B6","name":"COATEC: Report.End.Hour"},{"addr":"DB300,B7","name":"COATEC: Report.End.Minute"}]},{"id":"ca2bf62245caf5ae","type":"ui_group","name":"reports","tab":"667d76cb38039bc5","order":1,"disp":false,"width":"25","collapse":false,"className":""},{"id":"667d76cb38039bc5","type":"ui_tab","name":"REPORTS","icon":"dashboard","order":12,"disabled":false,"hidden":true}]

an in node of the plc, then a function and finally a template node that shows the information of the PLC variables on the dashboard.

The requirement would be to create a csv as shown in the template with its respective columns and rows.

Thank you very much!

You would be best outputting all properties in msg.payload, then referring to them in the ui-template node. Then you can pass the msg.payload through a csv node to create a .csv text output which you could then send to file write node, or where ever you wish.

I have started the alterations to your function and ui-template. you will need to finish the edit as i am not going to do it all, you just need to finish the commented sections and add payload to the properties in the ui-template node.
here is example flow

[{"id":"6a00d6e668f19df0","type":"change","z":"2493d0f1b4d72d1b","name":"","rules":[{"t":"set","p":"columns","pt":"msg","to":"$join($keys($$.payload),\"'\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":100,"wires":[["083cead8d5bc29d7"]]},{"id":"388c8d8f28a47fe1","type":"function","z":"2493d0f1b4d72d1b","name":"funciona_perfecto_v3","func":"var productName = msg.payload['COATEC: Product_Name'];\nvar productNumber = msg.payload['COATEC: Product_Number'];\nvar reportDateMonth = msg.payload['COATEC: Report.Date.Month'];\nvar reportDateYear = msg.payload['COATEC: Report.Date.Year'];\nvar reportDateDay = msg.payload['COATEC: Report.Date.Day'];\nvar date = msg.payload.date || (reportDateMonth + '/' + reportDateDay + '/' + reportDateYear);\nvar reportStartHour = msg.payload['COATEC: Report.Start.Hour'];\nvar reportStartMinute = msg.payload['COATEC: Report.Start.Minute'];\nvar startTime = msg.payload.startTime || (reportStartHour + ' : ' + reportStartMinute);\nvar reportEndHour = msg.payload['COATEC: Report.End.Hour'];\nvar reportEndMinute = msg.payload['COATEC: Report.End.Minute'];\nvar endTime = msg.payload.endTime || (reportEndHour + ' : ' + reportEndMinute);\nvar TotalHours = msg.payload['COATEC: Total_Hours'];\nvar TotalSeconds = msg.payload['COATEC: Total_Seconds'];\nvar TotalMinutes = msg.payload['COATEC: Total_Minutes'];\nvar cycleTime = msg.payload.cycleTime || (TotalHours + ' : ' + TotalMinutes + ' : ' + TotalSeconds);\nvar pauseTotalHours = msg.payload['COATEC: Total_Hours_Pause'];\nvar pauseTotalMinutes = msg.payload['COATEC: Total_Minutes_Pause'];\nvar pauseTotalSeconds = msg.payload['COATEC: Total_Seconds_Pause'];\nvar pauseTime = msg.payload.pauseTime || (pauseTotalHours + ' : ' + pauseTotalMinutes + ' : ' + pauseTotalSeconds);\nvar tank1Total = msg.payload['COATEC: Total_Tank_1'] + \" kg\";\nvar tank2Total = msg.payload['COATEC: Total_Tank_2'] + \" kg\";\nvar minAirTemperature = (parseFloat(msg.payload['COATEC: Minimum_Air_Temperature']) / 10).toFixed(1).replace('.', ',');\nvar mediumAirTemperature = (parseFloat(msg.payload['COATEC: Medium_Air_Temperature']) / 10).toFixed(1).replace('.', ',');\nvar maxAirTemperature = (parseFloat(msg.payload['COATEC: Maximum_Air_Temperature']) / 10).toFixed(1).replace('.', ',');\nvar minFlow = parseInt(msg.payload['COATEC: Minimum_Flow']);\nvar mediumFlow = parseInt(msg.payload['COATEC: Medium_Flow']);\nvar maxFlow = parseInt(msg.payload['COATEC: Maximum_Flow']);\nvar minHumidity = (parseFloat(msg.payload['COATEC: Minimum_Humidity']) / 10).toFixed(1).replace('.',\",\");\nvar mediumHumidity = (parseFloat(msg.payload['COATEC: Medium_Humidity']) / 10).toFixed(1).replace('.',\",\");\nvar maxHumidity = (parseFloat(msg.payload['COATEC: Maximum_Humidity']) / 10).toFixed(1).replace('.',\",\");\n\nmsg.payload = {\n    productName: productName,\n    productNumber: productNumber,\n    date: date,\n    startTime: startTime,\n//msg.endTime = endTime;\n//msg.cycleTime = cycleTime;\n//msg.pauseTime = pauseTime;\n//msg.tank1Total = tank1Total;\n//msg.tank2Total = tank2Total;\n    minAirTemperature: \"+\" + minAirTemperature + \" ºC\",\n//msg.mediumAirTemperature = \"+\" + mediumAirTemperature + \" ºC\";\n//msg.maxAirTemperature = \"+\" + maxAirTemperature + \" ºC\";\n//msg.minFlow = \"+\" + minFlow + \" m3/h\";\n///msg.mediumFlow = \"+\" + mediumFlow + \" m3/h\";\n//msg.maxFlow = \"+\" + maxFlow + \" m3/h\";\n//msg.minHumidity = \"+\" + minHumidity + \" g/kg\";\n//msg.mediumHumidity = \"+\" + mediumHumidity + \" g/kg\";\n    maxHumidity : \"+\" + maxHumidity + \" g/kg\"\n}\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":200,"wires":[["99b5b4494ee48de6","6a00d6e668f19df0"]]},{"id":"083cead8d5bc29d7","type":"csv","z":"2493d0f1b4d72d1b","name":"","sep":",","hdrin":"","hdrout":"all","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":650,"y":100,"wires":[["0c40c9aeccc31a73"]]},{"id":"76460868d3713d74","type":"s7 in","z":"2493d0f1b4d72d1b","endpoint":"0f29c96eb80de212","mode":"all","variable":"COATEC: Product_Name","diff":true,"name":"","x":390,"y":200,"wires":[["388c8d8f28a47fe1"]]},{"id":"99b5b4494ee48de6","type":"ui_template","z":"2493d0f1b4d72d1b","group":"ca2bf62245caf5ae","name":"funciona_perfecto_v4","order":3,"width":8,"height":10,"format":"<p><strong>Work report:</strong></p>\n<table style=\"border-collapse: collapse; font-size: 13px; font-weight: bold ;margin-top: 20px; height: 1000px;\" border=\"1\">\n  <tbody>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>PRODUCT NAME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.payload.productName}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>PRODUCT NUMBER</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.payload.productNumber}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>DATE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.date}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>START TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.startTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>END TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.endTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>CYCLE TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.cycleTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>PAUSE TIME</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.pauseTime}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>TANK 1 TOTAL</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.tank1Total}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>TANK 2 TOTAL</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.tank2Total}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MINIMUM AIR TEMPERATURE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.minAirTemperature}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MEDIUM AIR TEMPERATURE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.mediumAirTemperature}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM AIR TEMPERATURE</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.maxAirTemperature}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MINIMUM FLOW</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.minFlow}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MEDIUM FLOW</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.mediumFlow}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM FLOW</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.maxFlow}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MINIMUM HUMIDITY</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.minHumidity}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MEDIUM HUMIDITY</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.mediumHumidity}}</td>\n    </tr>\n    <tr>\n      <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM HUMIDITY</strong></p></td>\n      <td style=\"white-space: nowrap;\">{{msg.maxHumidity}}</td>\n    </tr>\n  </tbody>\n</table>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":920,"y":200,"wires":[[]]},{"id":"0c40c9aeccc31a73","type":"debug","z":"2493d0f1b4d72d1b","name":"debug 344","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":810,"y":100,"wires":[]},{"id":"ca2bf62245caf5ae","type":"ui_group","name":"reports","tab":"667d76cb38039bc5","order":1,"disp":false,"width":"25","collapse":false,"className":""},{"id":"667d76cb38039bc5","type":"ui_tab","name":"REPORTS","icon":"dashboard","order":12,"disabled":false,"hidden":true}]

[edit] Please finish the edits and post back when done with the new flow json and any other questions.

I don't understand very well what the requirement should be for each node, I saw that you have put set.msg.columns node --> csv node --> debug node

In the set.msg node what do I have to do? add the columns? and the lines?

And in the csv node, put the path where I want the csv to be saved?

Thank you very much for the reply.

I clearly explained what you need to do.

May be you should reread my post.

I have modified the function, I have removed the comments.

Then the payload of the template node, I have set msg.productName for example, I should remove the msg. to productName only?

Then for the node set msg.colums what can I do more?

And finally for the .csv, I can save it in some path and I have to do something?

At the time to put pictures I removed a httpStatic comment in settings.js.

Thanks for helping me, I don't understand javascript.

I await the edited flow json.

Please follow all requests fully.

You can add a file write node with the uri to save the csv text.

Here is the entire flow.

[{"id":"15912dfd8e2b988f","type":"ui_template","z":"62dda00db8fbba50","group":"06d849adadf3c2b0","name":"coatec700","order":2,"width":5,"height":10,"format":"<style>\n  #image1 {\n    background-image: url('/COATEC.png');\n    background-repeat: no-repeat;\n    background-position: center center;\n    height: 500px;\n    background-size: 70%;\n  }\n</style>\n<div id=\"image1\"></div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":370,"y":260,"wires":[[]]},{"id":"06d849adadf3c2b0","type":"ui_group","name":"registry","tab":"704f5a054c088936","order":1,"disp":false,"width":"25","collapse":false,"className":""},{"id":"704f5a054c088936","type":"ui_tab","name":"REGISTRY","icon":"dashboard","order":13,"disabled":false,"hidden":true}]

I don't know more about how the following works

What should I do in the msg.columns set?

And then in the csv node? Can I put a path or configure it?

Many thanks for everything

Again I await you flow json that has been edited. Check what you posted.

Again you can add a file write node after the cvs node to save it to file.

msg.colums is used to create a column list so that the cvs node knows the column names. It does not need you to do anything, it automatically creates the names from the payload property keys. That is why i await you edited flow json to see if you have edited it correctly.

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