Drop down by filtering csv

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.

got the answer to the drop down problem :point_down:

now need to correct the sequence problem.

When you say sequence, do you mean order if so you can add order by to end of expression

$flowContext("csv")[Work_enter = $$.payload]^(Order_number)

@E1cid , By sequence I meant in the join node. when I click submit the sequence order for payload is random.

can you supply a simple flow that shows the issue, as i can not import you whole flow as it has nodes that i do not have installed. So collect the incoming data (using debugs to copy messages) to the join then add that data to inject nodes, to simulate the data coming in to the join followed by a debug to see the join issue.

Here's the simplified flow

[{"id":"219cffbf.dfad","type":"group","z":"418dcf18.f9778","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["4d816378.7c807c","8c709349.b847a","d57c26df.cf7e38","2ca0e388.99d98c","48edc62a.51b088","d6d27a34.c17a58","7c7f3690.971fe8","aed56072.f9e53","85a97d1d.5bd4d","b614c29b.ee6b3","f7f39779.62ca28","b9902df1.35218","84067b95.47c588","6c8f9aa2.c714b4","50c1e358.ee1ccc","34ee03d4.86cb2c","ffa73f37.12343","af9f1602.439ca8","be8f93dd.b0962","9b71bc7d.d894e","67c84806.40dc88","18f53eba.8807a1"],"x":74,"y":199,"w":1202,"h":442},{"id":"4d816378.7c807c","type":"ui_dropdown","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"Breakdown reasons","label":"Breakdown reason","tooltip":"Breakdown reason","place":"Select Breakdown reason","group":"85ff32ed.59a9c","order":8,"width":10,"height":1,"passthru":false,"multiple":true,"options":[{"label":"Breakdown reason 1","value":"Reason 1","type":"str"},{"label":"Breakdown reason 2","value":"Reason 2","type":"str"},{"label":"Breakdown reason 3","value":"Reason 3","type":"str"},{"label":"Breakdown reason 4","value":"Reason 4","type":"str"}],"payload":"","topic":"Breakdown reason","topicType":"str","x":460,"y":520,"wires":[["6c8f9aa2.c714b4"]]},{"id":"8c709349.b847a","type":"ui_date_picker","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"","label":"Start date","group":"85ff32ed.59a9c","order":4,"width":7,"height":1,"passthru":false,"topic":"Start date","topicType":"str","x":500,"y":360,"wires":[["b614c29b.ee6b3"]]},{"id":"d57c26df.cf7e38","type":"ui_text_input","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"Start Time","label":"Start Time","tooltip":"Start Time","group":"85ff32ed.59a9c","order":5,"width":3,"height":1,"passthru":false,"mode":"time","delay":300,"topic":"Start Time","topicType":"str","x":490,"y":400,"wires":[["f7f39779.62ca28"]]},{"id":"2ca0e388.99d98c","type":"ui_text_input","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"machine number","label":"Machine Number","tooltip":"Machine Number","group":"85ff32ed.59a9c","order":3,"width":5,"height":1,"passthru":true,"mode":"number","delay":300,"topic":"Machine Number","topicType":"str","x":470,"y":320,"wires":[["6c8f9aa2.c714b4"]]},{"id":"48edc62a.51b088","type":"ui_dropdown","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"Machine category","label":"","tooltip":"","place":"Machine category","group":"85ff32ed.59a9c","order":2,"width":5,"height":1,"passthru":false,"multiple":false,"options":[{"label":"CNC","value":"CNC","type":"str"},{"label":"VMC","value":"VMC","type":"str"},{"label":"Boltmaker","value":"Boltmaker","type":"str"},{"label":"Header","value":"Header","type":"str"}],"payload":"","topic":"Machine category","topicType":"str","x":470,"y":280,"wires":[["6c8f9aa2.c714b4"]]},{"id":"d6d27a34.c17a58","type":"ui_date_picker","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"","label":"End date","group":"85ff32ed.59a9c","order":6,"width":7,"height":1,"passthru":false,"topic":"End date","topicType":"str","x":500,"y":440,"wires":[["b9902df1.35218"]]},{"id":"7c7f3690.971fe8","type":"ui_text_input","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"End Time","label":"End Time","tooltip":"End Time","group":"85ff32ed.59a9c","order":7,"width":3,"height":1,"passthru":true,"mode":"time","delay":300,"topic":"End Time","topicType":"str","x":500,"y":480,"wires":[["84067b95.47c588"]]},{"id":"aed56072.f9e53","type":"ui_dropdown","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"M/C Location","label":"M/C Location","tooltip":"M/C Location","place":"Select M/C Location","group":"85ff32ed.59a9c","order":1,"width":10,"height":1,"passthru":false,"multiple":false,"options":[{"label":"Shed 1","value":"Shed 1","type":"str"},{"label":"Shed 2","value":"Shed 2","type":"str"},{"label":"Shed 3","value":"Shed 3","type":"str"},{"label":"Shed 4","value":"Shed 4","type":"str"}],"payload":"","topic":"Machine Location","topicType":"str","x":490,"y":240,"wires":[["6c8f9aa2.c714b4"]]},{"id":"85a97d1d.5bd4d","type":"change","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"timestamp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":240,"wires":[["8c709349.b847a","d6d27a34.c17a58"]]},{"id":"b614c29b.ee6b3","type":"change","z":"418dcf18.f9778","g":"219cffbf.dfad","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":650,"y":360,"wires":[["6c8f9aa2.c714b4"]]},{"id":"f7f39779.62ca28","type":"change","z":"418dcf18.f9778","g":"219cffbf.dfad","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":630,"y":400,"wires":[["6c8f9aa2.c714b4"]]},{"id":"b9902df1.35218","type":"change","z":"418dcf18.f9778","g":"219cffbf.dfad","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":650,"y":440,"wires":[["6c8f9aa2.c714b4"]]},{"id":"84067b95.47c588","type":"change","z":"418dcf18.f9778","g":"219cffbf.dfad","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":630,"y":480,"wires":[["6c8f9aa2.c714b4"]]},{"id":"6c8f9aa2.c714b4","type":"join","z":"418dcf18.f9778","g":"219cffbf.dfad","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":910,"y":380,"wires":[["18f53eba.8807a1"]]},{"id":"50c1e358.ee1ccc","type":"ui_button","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"","group":"85ff32ed.59a9c","order":10,"width":4,"height":1,"passthru":false,"label":"Submit","tooltip":"","color":"","bgcolor":"","icon":"","payload":"complete","payloadType":"str","topic":"","topicType":"str","x":500,"y":560,"wires":[["34ee03d4.86cb2c","ffa73f37.12343"]]},{"id":"34ee03d4.86cb2c","type":"change","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"complete","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":560,"wires":[["6c8f9aa2.c714b4"]]},{"id":"ffa73f37.12343","type":"change","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":600,"wires":[["af9f1602.439ca8"]]},{"id":"af9f1602.439ca8","type":"delay","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":880,"y":600,"wires":[["be8f93dd.b0962"]]},{"id":"be8f93dd.b0962","type":"link out","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"","links":["9b71bc7d.d894e"],"x":995,"y":600,"wires":[]},{"id":"9b71bc7d.d894e","type":"link in","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"","links":["be8f93dd.b0962","5026e4fc.8283fc"],"x":115,"y":400,"wires":[["85a97d1d.5bd4d","aed56072.f9e53","48edc62a.51b088","2ca0e388.99d98c","d57c26df.cf7e38","7c7f3690.971fe8","4d816378.7c807c"]]},{"id":"67c84806.40dc88","type":"file","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"save to file","filename":"C:\\Users\\Sahil\\Desktop\\breakdown.csv","appendNewline":false,"createDir":true,"overwriteFile":"false","encoding":"none","x":1180,"y":500,"wires":[[]]},{"id":"18f53eba.8807a1","type":"csv","z":"418dcf18.f9778","g":"219cffbf.dfad","name":"","sep":",","hdrin":"","hdrout":"once","multi":"one","ret":"\\r\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":980,"y":500,"wires":[["67c84806.40dc88"]]},{"id":"85ff32ed.59a9c","type":"ui_group","name":"Breakdown Entry form","tab":"e7529986.615ce8","order":1,"disp":true,"width":10,"collapse":false},{"id":"e7529986.615ce8","type":"ui_tab","name":"Breakdown Entry Form","icon":"add_alert","order":3,"disabled":false,"hidden":false}]

set the columns in the csv node to sequence the cvs data
here is a simple example. Note this is how you should of shown me the issue, so it is simple and all data is there.

[{"id":"2b765d1e.608b9a","type":"inject","z":"a80913f6.edcdb8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"one","payload":"1","payloadType":"num","x":540,"y":460,"wires":[["51fd3e78.409b68"]]},{"id":"51fd3e78.409b68","type":"join","z":"a80913f6.edcdb8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":700,"y":520,"wires":[["dbed13e9.e7206"]]},{"id":"36feac2d.f0c93c","type":"inject","z":"a80913f6.edcdb8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"two","payload":"2","payloadType":"num","x":540,"y":520,"wires":[["51fd3e78.409b68"]]},{"id":"9e11cbd2.095958","type":"inject","z":"a80913f6.edcdb8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"three","payload":"3","payloadType":"num","x":550,"y":580,"wires":[["51fd3e78.409b68"]]},{"id":"dbed13e9.e7206","type":"csv","z":"a80913f6.edcdb8","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"one,two,three","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":840,"y":520,"wires":[["e5366351.63e038"]]},{"id":"e5366351.63e038","type":"debug","z":"a80913f6.edcdb8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1020,"y":520,"wires":[]}]

have a look in cvs node. No matter the sequence you press injects the output is always 123

Understood. thanks :+1:
Will update my flow accordingly.

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