hello! need help with a flow. the drop down "work center" & "Order No" not working properly.
On pressing button "fetch orders" pushes the work center data in dropdown and on selection it filters the data and pushes next to "work order" dropdown. But its not working properly.
So need help, flow is given below:
[{"id":"fd20beb2.0d957","type":"tab","label":"Breakdown form","disabled":false,"info":""},{"id":"e642510e.a315f","type":"ui_text","z":"fd20beb2.0d957","group":"162e61a9.5d8dee","order":2,"width":4,"height":1,"name":"","label":"Posting Date :","format":"{{msg.payload}}","layout":"row-left","x":680,"y":120,"wires":[]},{"id":"1096e6ce.85eff9","type":"inject","z":"fd20beb2.0d957","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":370,"y":120,"wires":[["68733109.54d2e"]]},{"id":"2ddf0d85.ea1dc2","type":"ui_dropdown","z":"fd20beb2.0d957","name":"","label":"Shift","tooltip":"","place":"Select shift","group":"f9e41b13.1fe7a8","order":7,"width":4,"height":1,"passthru":false,"multiple":false,"options":[{"label":"A","value":"A","type":"str"},{"label":"B","value":"B","type":"str"}],"payload":"","topic":"topic","topicType":"msg","x":730,"y":700,"wires":[["d355d09b.6f24"]]},{"id":"f24d7e50.20701","type":"ui_text_input","z":"fd20beb2.0d957","name":"Start Time","label":"Start Time","tooltip":"Start Time","group":"f9e41b13.1fe7a8","order":5,"width":3,"height":1,"passthru":false,"mode":"time","delay":300,"topic":"Start_Time","topicType":"str","x":740,"y":820,"wires":[["d0bf4f47.05a94"]]},{"id":"d7e88a39.a6de98","type":"ui_date_picker","z":"fd20beb2.0d957","name":"","label":"Start date","group":"f9e41b13.1fe7a8","order":6,"width":5,"height":1,"passthru":false,"topic":"Start_date","topicType":"str","x":740,"y":740,"wires":[["b1955da5.c99f6"]]},{"id":"a169e909.f6b518","type":"ui_date_picker","z":"fd20beb2.0d957","name":"","label":"End date","group":"f9e41b13.1fe7a8","order":11,"width":5,"height":1,"passthru":false,"topic":"End_date","topicType":"str","x":740,"y":780,"wires":[["f089f523.5724c8"]]},{"id":"c2411f69.be4d4","type":"ui_text_input","z":"fd20beb2.0d957","name":"End Time","label":"End Time","tooltip":"End Time","group":"f9e41b13.1fe7a8","order":10,"width":3,"height":1,"passthru":false,"mode":"time","delay":300,"topic":"End_Time","topicType":"str","x":740,"y":860,"wires":[["99726772.f027f8"]]},{"id":"b1955da5.c99f6","type":"change","z":"fd20beb2.0d957","name":"dd-mm-yyyy","rules":[{"t":"set","p":"payload","pt":"msg","to":"$moment(payload).tz(\"Europe/London\").format(\"DD-MM-YYYY\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":740,"wires":[["85d6eb3f.62b3e8"]]},{"id":"d0bf4f47.05a94","type":"change","z":"fd20beb2.0d957","name":"hh:mm","rules":[{"t":"set","p":"payload","pt":"msg","to":"$moment(payload).tz(\"Europe/London\").format(\"HH:mm\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":820,"wires":[["e89682fb.4764b"]]},{"id":"f089f523.5724c8","type":"change","z":"fd20beb2.0d957","name":"dd-mm-yyyy","rules":[{"t":"set","p":"payload","pt":"msg","to":"$moment(payload).tz(\"Europe/London\").format(\"DD-MM-YYYY\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":780,"wires":[["9a6e14f2.84f4d8"]]},{"id":"99726772.f027f8","type":"change","z":"fd20beb2.0d957","name":"hh:mm","rules":[{"t":"set","p":"payload","pt":"msg","to":"$moment(payload).tz(\"Europe/London\").format(\"HH:mm\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":860,"wires":[["7c159c3b.fce3f4"]]},{"id":"c971cce5.88a9c","type":"ui_dropdown","z":"fd20beb2.0d957","name":"Breakdown reasons","label":"Breakdown reason","tooltip":"Breakdown reason","place":"Select Breakdown reason","group":"f9e41b13.1fe7a8","order":8,"width":10,"height":1,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"Breakdown reason","topicType":"str","x":770,"y":900,"wires":[["836c5773.159a68"]]},{"id":"2d869a98.7e0f16","type":"ui_button","z":"fd20beb2.0d957","name":"","group":"f9e41b13.1fe7a8","order":14,"width":5,"height":1,"passthru":false,"label":"Submit","tooltip":"","color":"","bgcolor":"","icon":"","payload":"complete","payloadType":"str","topic":"","topicType":"str","x":730,"y":1000,"wires":[["16c6115f.e5bcbf","ba495f3d.bc474"]]},{"id":"179bd0b8.89044f","type":"ui_table","z":"fd20beb2.0d957","group":"5179bc3b.985dd4","name":"submition report","order":1,"width":24,"height":2,"columns":[],"outputs":0,"cts":false,"x":1080,"y":1080,"wires":[]},{"id":"1c233064.2dd4b","type":"join","z":"fd20beb2.0d957","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":1550,"y":600,"wires":[["591598f1.fefd78"]]},{"id":"41e4ff59.840ee","type":"link in","z":"fd20beb2.0d957","name":"","links":["9dc0d65b.64a128"],"x":235,"y":760,"wires":[["91f54c58.30a4f"]]},{"id":"9dc0d65b.64a128","type":"link out","z":"fd20beb2.0d957","name":"","links":["41e4ff59.840ee","94d212c4.a29e7","e3856566.ca5c08","7da48f3f.4c714","dde9f2ca.adb85","79be03db.31abbc","65294a89.62e3a4"],"x":1295,"y":1020,"wires":[]},{"id":"16c6115f.e5bcbf","type":"change","z":"fd20beb2.0d957","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"complete","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":980,"wires":[["3a9eda1f.4a1a96"]]},{"id":"ba495f3d.bc474","type":"change","z":"fd20beb2.0d957","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":1020,"wires":[["9786f876.7c39f8"]]},{"id":"9786f876.7c39f8","type":"delay","z":"fd20beb2.0d957","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1160,"y":1020,"wires":[["9dc0d65b.64a128"]]},{"id":"91f54c58.30a4f","type":"change","z":"fd20beb2.0d957","name":"0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":760,"wires":[["44b2d22d.00d21c"]]},{"id":"5521cf97.4e1f3","type":"file","z":"fd20beb2.0d957","name":"breakdown.csv","filename":"D:\\testing\\breakdown.csv","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"none","x":1720,"y":680,"wires":[[]]},{"id":"1959427e.99693e","type":"file in","z":"fd20beb2.0d957","name":"submition report","filename":"D:\\testing\\breakdown.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":760,"y":1080,"wires":[["d46547e6.219768"]]},{"id":"d46547e6.219768","type":"csv","z":"fd20beb2.0d957","name":"","sep":",","hdrin":true,"hdrout":"all","multi":"mult","ret":"\\r\\n","temp":"","skip":"0","strings":true,"include_empty_strings":false,"include_null_values":false,"x":930,"y":1080,"wires":[["179bd0b8.89044f"]]},{"id":"a070bbc0.398b58","type":"link in","z":"fd20beb2.0d957","name":"","links":["85d6eb3f.62b3e8","9a6e14f2.84f4d8","e89682fb.4764b","7c159c3b.fce3f4","3a9eda1f.4a1a96","836c5773.159a68","d355d09b.6f24","c86609ae.3ef4a8","15cf1cb5.9f2453","a9ee1664.b911e8"],"x":1435,"y":600,"wires":[["1c233064.2dd4b"]]},{"id":"e89682fb.4764b","type":"link out","z":"fd20beb2.0d957","name":"","links":["a070bbc0.398b58"],"x":1015,"y":820,"wires":[]},{"id":"7c159c3b.fce3f4","type":"link out","z":"fd20beb2.0d957","name":"","links":["a070bbc0.398b58"],"x":1015,"y":860,"wires":[]},{"id":"85d6eb3f.62b3e8","type":"link out","z":"fd20beb2.0d957","name":"","links":["a070bbc0.398b58"],"x":1015,"y":740,"wires":[]},{"id":"9a6e14f2.84f4d8","type":"link out","z":"fd20beb2.0d957","name":"","links":["a070bbc0.398b58"],"x":1015,"y":780,"wires":[]},{"id":"3a9eda1f.4a1a96","type":"link out","z":"fd20beb2.0d957","name":"","links":["a070bbc0.398b58","17095bbc.9cf004"],"x":1295,"y":980,"wires":[]},{"id":"836c5773.159a68","type":"link out","z":"fd20beb2.0d957","name":"","links":["a070bbc0.398b58"],"x":1015,"y":900,"wires":[]},{"id":"17922f4d.528801","type":"link in","z":"fd20beb2.0d957","name":"","links":["44b2d22d.00d21c"],"x":615,"y":820,"wires":[["f24d7e50.20701"]]},{"id":"90f2659f.56d478","type":"link in","z":"fd20beb2.0d957","name":"","links":["44b2d22d.00d21c"],"x":615,"y":860,"wires":[["c2411f69.be4d4"]]},{"id":"94d212c4.a29e7","type":"link in","z":"fd20beb2.0d957","name":"","links":["9dc0d65b.64a128"],"x":615,"y":900,"wires":[["c971cce5.88a9c"]]},{"id":"e3856566.ca5c08","type":"link in","z":"fd20beb2.0d957","name":"","links":["9dc0d65b.64a128"],"x":615,"y":700,"wires":[["2ddf0d85.ea1dc2"]]},{"id":"d355d09b.6f24","type":"link out","z":"fd20beb2.0d957","name":"","links":["a070bbc0.398b58"],"x":1015,"y":700,"wires":[]},{"id":"44b2d22d.00d21c","type":"link out","z":"fd20beb2.0d957","name":"","links":["1f7daa37.40f246","42eeac3b.95d984","17922f4d.528801","90f2659f.56d478"],"x":495,"y":760,"wires":[]},{"id":"1f7daa37.40f246","type":"link in","z":"fd20beb2.0d957","name":"","links":["44b2d22d.00d21c"],"x":615,"y":740,"wires":[["d7e88a39.a6de98"]]},{"id":"42eeac3b.95d984","type":"link in","z":"fd20beb2.0d957","name":"","links":["44b2d22d.00d21c"],"x":615,"y":780,"wires":[["a169e909.f6b518"]]},{"id":"c86609ae.3ef4a8","type":"link out","z":"fd20beb2.0d957","name":"","links":["a070bbc0.398b58"],"x":615,"y":160,"wires":[]},{"id":"60f09522.e8671c","type":"inject","z":"fd20beb2.0d957","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":400,"y":300,"wires":[["bf869068.10bd8"]]},{"id":"46ac76f4.f36438","type":"csv","z":"fd20beb2.0d957","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":630,"y":340,"wires":[["ca7ca7d8.7631b8","1d28056e.47670b"]]},{"id":"ca7ca7d8.7631b8","type":"change","z":"fd20beb2.0d957","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct(payload.Work_Center)","tot":"jsonata"},{"t":"move","p":"payload","pt":"msg","to":"csv","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":380,"wires":[["2bc4414e.fde82e"]]},{"id":"2bc4414e.fde82e","type":"ui_dropdown","z":"fd20beb2.0d957","name":"Work center","label":"Work center","tooltip":"","place":"select","group":"f9e41b13.1fe7a8","order":1,"width":7,"height":1,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"Work_Center","topicType":"str","x":790,"y":420,"wires":[["4be64f55.71cbd","15cf1cb5.9f2453"]]},{"id":"4be64f55.71cbd","type":"change","z":"fd20beb2.0d957","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$flowContext(\"csv\")[Work_Center = $$.payload] ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":460,"wires":[["e78d2f1b.574a6","9615b085.4b0d9"]]},{"id":"21f43e84.8a0cf2","type":"file in","z":"fd20beb2.0d957","name":"mt02order","filename":"C:\\Users\\Sahil\\Desktop\\testing\\mt02order.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":570,"y":260,"wires":[[]]},{"id":"e78d2f1b.574a6","type":"change","z":"fd20beb2.0d957","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct(payload.Order_No)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":500,"wires":[["6be3db5b.c96fa4"]]},{"id":"6be3db5b.c96fa4","type":"ui_dropdown","z":"fd20beb2.0d957","name":"Order No.","label":"Order No.","tooltip":"","place":"Select","group":"f9e41b13.1fe7a8","order":2,"width":10,"height":1,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"Order_No","topicType":"msg","x":1100,"y":540,"wires":[["a9ee1664.b911e8","61787a81.d26ae4"]]},{"id":"bf869068.10bd8","type":"template","z":"fd20beb2.0d957","name":"simulate file - mt02order","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Order_No,Work_Center,Material,Work_Center_Description,Cycle_TIme,Material_Description,Order_Qty,Confirm_Qty,Creation_date,Pending_Qty,Person_Responsible,Plant,Drg_No\n,,,,,,,,,,,,\n100070432,M02HD008,C-M-201-0696-01,HD008 HEADER,3,SHAFT SWING ARM UPTO COLD FORGING,750,750,08.06.2021,0,RAM SINGH,MT02,M-0696\n100070441,M02MBF01,C-M-201-3449-02,MBF1 MBF HARDENING & WASHING,1.67,BOLT SWING ARM PIVOT UPTO HT,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",PAWAN,MT02,M-3449\n100070296,M02MBF01,C-M-201-3449-02,MBF1 MBF HARDENING & WASHING,1.67,BOLT SWING ARM PIVOT UPTO HT,\"2,000.00\",\"2,000.00\",05.06.2021,0,PAWAN,MT02,M-3449\n100070441,M02ST003,C-M-201-3449-03,ST03 STRAIGHTENING,8,BOLT SWING ARM PIVOT UPTO STRAIGHTENING,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070296,M02ST003,C-M-201-3449-03,ST03 STRAIGHTENING,8,BOLT SWING ARM PIVOT UPTO STRAIGHTENING,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070297,M02CL013,C-M-201-3449-04,CL13 CENTRE LESS GRINDER,7,BOLT SWING ARM PIVOT UPTO DIA HALF GRIND,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070441,M02CL013,C-M-201-3449-04,CL13 CENTRE LESS GRINDER,7,BOLT SWING ARM PIVOT UPTO DIA HALF GRIND,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070297,M02CL013,C-M-201-3449-05,CL13 CENTRE LESS GRINDER,6,BOLT SWING ARM PIVOT UPTO DIA FINAL GRIN,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070441,M02CL013,C-M-201-3449-05,CL13 CENTRE LESS GRINDER,6,BOLT SWING ARM PIVOT UPTO DIA FINAL GRIN,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070441,M02TR007,C-M-201-3449-06,TR07 THREAD ROLLING,7,BOLT SWING ARM PIVOT UPTO THREAD ROLLING,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070298,M02TR007,C-M-201-3449-06,TR07 THREAD ROLLING,7,BOLT SWING ARM PIVOT UPTO THREAD ROLLING,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070356,M02SB001,C-M-219-0286-04,SB01 SHOT BLASTING,7.2,PINION KICK STARTER UPTO SHOT BLASTING,\"15,911.00\",\"4,420.00\",07.06.2021,\"11,491.00\",UDAY THAKUR,MT02,M-0286\n100070512,M02SB001,C-M-219-0286-04,SB01 SHOT BLASTING,7.2,PINION KICK STARTER UPTO SHOT BLASTING,\"29,975.00\",\"1,600.00\",10.06.2021,\"28,375.00\",UDAY THAKUR,MT02,M-0286\n100070356,M02PH001,C-M-219-0286-05,PT PHOSPHATING TANKS,2,PINION KICK STARTER UPTO ZINK PH. & SOAP,\"31,861.00\",\"6,020.00\",07.06.2021,\"25,841.00\",UDAY THAKUR,MT02,M-0286\n100070356,M02KP003,C-M-219-0286-06,KP03 COLD FORGING,8,PINION KICK STARTER UPTO RT.COLD FORGING,\"31,861.00\",\"6,020.00\",07.06.2021,\"25,841.00\",UDAY THAKUR,MT02,M-0286\n100070420,M02CN001,C-M-219-0286-07,CNC01 TURNING CENTRE,55,PINION KICK STARTER UPTO CNC TURNING 1ST,\"12,501.00\",\"1,472.00\",08.06.2021,\"11,029.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN002,C-M-219-0286-07,CNC02 TURNING CENTRE,55,PINION KICK STARTER UPTO CNC TURNING 1ST,\"10,000.00\",\"1,611.00\",08.06.2021,\"8,389.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN005,C-M-219-0286-07,CNC05 TURNING CENTRE,65,PINION KICK STARTER UPTO CNC TURNING 1ST,\"5,000.00\",\"1,393.00\",08.06.2021,\"3,607.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN006,C-M-219-0286-07,CNC06 TURNING CENTRE,65,PINION KICK STARTER UPTO CNC TURNING 1ST,\"5,000.00\",\"1,599.00\",08.06.2021,\"3,401.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN003,C-M-219-0286-08,CNC03 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"12,862.00\",\"1,402.00\",08.06.2021,\"11,460.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN004,C-M-219-0286-08,CNC04 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"10,000.00\",\"1,661.00\",08.06.2021,\"8,339.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN007,C-M-219-0286-08,CNC07 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"5,000.00\",\"1,671.00\",08.06.2021,\"3,329.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN008,C-M-219-0286-08,CNC08 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"5,000.00\",\"1,336.00\",08.06.2021,\"3,664.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02HB004,C-M-219-0286-09,M02HB004-HOBBING,25,PINION KICK STARTER UPTO GEAR CUTTING,\"33,817.00\",\"5,450.00\",08.06.2021,\"28,367.00\",RAJA BABU,MT02,M-0286\n100070374,M02GCF02,C-M-219-0286-10,GCF02 GAS CARBURISING FURNACE,14,PINION KICK STARTER UPTO HT,\"3,500.00\",\"3,200.00\",07.06.2021,300,PAWAN,MT02,M-0286\n100070319,M02SB002,C-M-219-0286-11,SB02 SHOT BLASTING,2,PINION KICK STARTER UPTO SHOT BLASTING,\"35,001.00\",\"4,691.00\",05.06.2021,\"30,310.00\",UDAY THAKUR,MT02,M-0286","output":"str","x":610,"y":300,"wires":[["46ac76f4.f36438"]]},{"id":"9615b085.4b0d9","type":"ui_table","z":"fd20beb2.0d957","group":"f9e41b13.1fe7a8","name":"","order":4,"width":24,"height":3,"columns":[],"outputs":0,"cts":false,"x":1170,"y":280,"wires":[]},{"id":"1d28056e.47670b","type":"ui_table","z":"fd20beb2.0d957","group":"2891289a.2f7078","name":"all rows","order":1,"width":24,"height":4,"columns":[],"outputs":0,"cts":false,"x":860,"y":280,"wires":[]},{"id":"e737a768.c7c8a8","type":"ui_button","z":"fd20beb2.0d957","name":"Fetch Order No.","group":"162e61a9.5d8dee","order":3,"width":3,"height":1,"passthru":false,"label":"Fetch Order No.","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"fetchorderno","topicType":"msg","x":240,"y":240,"wires":[["f83d3949.d63b58","bf869068.10bd8"]]},{"id":"dde9f2ca.adb85","type":"link in","z":"fd20beb2.0d957","name":"","links":["9dc0d65b.64a128"],"x":675,"y":480,"wires":[["2bc4414e.fde82e"]]},{"id":"7da48f3f.4c714","type":"link in","z":"fd20beb2.0d957","name":"","links":["9dc0d65b.64a128"],"x":975,"y":560,"wires":[["6be3db5b.c96fa4"]]},{"id":"a9ee1664.b911e8","type":"link out","z":"fd20beb2.0d957","name":"","links":["a070bbc0.398b58"],"x":1215,"y":480,"wires":[]},{"id":"15cf1cb5.9f2453","type":"link out","z":"fd20beb2.0d957","name":"","links":["a070bbc0.398b58"],"x":915,"y":400,"wires":[]},{"id":"65294a89.62e3a4","type":"link in","z":"fd20beb2.0d957","name":"","links":["9dc0d65b.64a128"],"x":775,"y":340,"wires":[["1d28056e.47670b"]]},{"id":"79be03db.31abbc","type":"link in","z":"fd20beb2.0d957","name":"","links":["9dc0d65b.64a128"],"x":1135,"y":380,"wires":[["9615b085.4b0d9"]]},{"id":"591598f1.fefd78","type":"csv","z":"fd20beb2.0d957","name":"","sep":",","hdrin":true,"hdrout":"all","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":1630,"y":640,"wires":[["5521cf97.4e1f3","50d110c6.a12b7","ac60068c.48b018"]]},{"id":"50d110c6.a12b7","type":"debug","z":"fd20beb2.0d957","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1810,"y":600,"wires":[]},{"id":"17095bbc.9cf004","type":"link in","z":"fd20beb2.0d957","name":"","links":["3a9eda1f.4a1a96"],"x":495,"y":1080,"wires":[["686a090b.5b3e08"]]},{"id":"686a090b.5b3e08","type":"delay","z":"fd20beb2.0d957","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":600,"y":1080,"wires":[["1959427e.99693e"]]},{"id":"ac60068c.48b018","type":"ui_toast","z":"fd20beb2.0d957","position":"top right","displayTime":"3","highlight":"","sendall":false,"outputs":0,"ok":"OK","cancel":"","raw":true,"topic":"","name":"","x":1890,"y":640,"wires":[]},{"id":"68733109.54d2e","type":"function","z":"fd20beb2.0d957","name":"date","func":"var d = new Date(msg.payload);\nvar day = d.getDate();\nvar month = d.getMonth();\nvar monthformat = month + 1;\nvar year = d.getFullYear();\nmsg.payload = day +\"-\"+ monthformat +\"-\"+ year;\nmsg.topic = 'Posting_date';\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":120,"wires":[["c86609ae.3ef4a8","e642510e.a315f"]]},{"id":"52343b0a.967934","type":"ui_media","z":"fd20beb2.0d957","group":"162e61a9.5d8dee","name":"","width":1,"height":1,"order":1,"category":"logo","file":"logo transparent.png","layout":"adjust","showcontrols":false,"loop":false,"onstart":false,"scope":"local","tooltip":"","x":210,"y":120,"wires":[[]]},{"id":"61787a81.d26ae4","type":"debug","z":"fd20beb2.0d957","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1290,"y":540,"wires":[]},{"id":"592104b1.cae37c","type":"file in","z":"fd20beb2.0d957","name":"Breakdown reasons","filename":"C:\\Users\\Sahil\\Desktop\\testing\\breakdown_reasons.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":200,"y":480,"wires":[[]]},{"id":"5655b762.aea3e8","type":"csv","z":"fd20beb2.0d957","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":290,"y":560,"wires":[["147c0f71.3a9091"]]},{"id":"147c0f71.3a9091","type":"change","z":"fd20beb2.0d957","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct(payload.Breakdown_reason)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":600,"wires":[["c971cce5.88a9c"]]},{"id":"f83d3949.d63b58","type":"template","z":"fd20beb2.0d957","name":"simulate file - breakdown reason","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Breakdown_reason\nWarming up time\nNo raw material\nInsert change or adjustment\nMachine accident\nTool not available\nNo operator\nInspection time\nMachine cleaning\nPreventive maintenance\nNew part development\nLate start early stoppage\nLoad unload\nSpindle off time\nAxis off time\nMachine off time\nRework\nSetup\nMaintenance\nExcess load unload\nMachine breakdown\nSchedule closure\nSmall stop losses\nPlanned idle time\nReason unknown\nNo data","output":"str","x":230,"y":520,"wires":[["5655b762.aea3e8"]]},{"id":"f5fc1599.2b62f8","type":"change","z":"fd20beb2.0d957","name":"timestamp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":720,"wires":[[]]},{"id":"162e61a9.5d8dee","type":"ui_group","name":"Heading","tab":"74fd02f9.b99b3c","order":1,"disp":false,"width":"24","collapse":false},{"id":"f9e41b13.1fe7a8","type":"ui_group","name":"form","tab":"74fd02f9.b99b3c","order":3,"disp":false,"width":"24","collapse":false},{"id":"5179bc3b.985dd4","type":"ui_group","name":"Entry Confirmation","tab":"74fd02f9.b99b3c","order":4,"disp":true,"width":24,"collapse":false},{"id":"2891289a.2f7078","type":"ui_group","name":"View orders","tab":"74fd02f9.b99b3c","order":2,"disp":true,"width":"24","collapse":true},{"id":"74fd02f9.b99b3c","type":"ui_tab","name":"Breakdown entry form","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
Also when submit button is pressed the entries are not sequenced.