How to have two dropdowns from a CSV to find the corresponding value

Hello everyone I am fairly new to Node-RED and this is my first post on the forums! I found a similar problem, but it was a bit more simple and didn't work for my problem.

I have two dropdowns that the user will select in a dashboard (from the CSV column A and column C). My goal is for when the user makes the selection, it will search the CSV for a row that matches the inputs, and has a output of the matching value in column D.

Here is an example of the CSV:

Here is the code:

[
    {
        "id": "df663e090db235b9",
        "type": "file in",
        "z": "9b03cc7ebfdc5189",
        "name": "config_line",
        "filename": "/home/dev/secured/ShippingStandards.csv",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 330,
        "y": 840,
        "wires": [
            [
                "25c2bd2842ef3426"
            ]
        ]
    },
    {
        "id": "25c2bd2842ef3426",
        "type": "csv",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "sep": ",",
        "hdrin": true,
        "hdrout": "all",
        "multi": "mult",
        "ret": "\\n",
        "temp": "",
        "skip": "0",
        "strings": true,
        "include_empty_strings": false,
        "include_null_values": false,
        "x": 490,
        "y": 840,
        "wires": [
            [
                "a30ac88d9fdf90b4",
                "b99a78f1014f5d24",
                "da6d3fe21d3b98b3"
            ]
        ]
    },
    {
        "id": "ca84b1bc12776c8c",
        "type": "inject",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payloadType": "date",
        "x": 140,
        "y": 840,
        "wires": [
            [
                "df663e090db235b9"
            ]
        ]
    },
    {
        "id": "253a33f4844238a1",
        "type": "ui_dropdown",
        "z": "9b03cc7ebfdc5189",
        "name": "Drop Down Order Type Code Description",
        "label": "Order Type Code Description",
        "tooltip": "",
        "place": "Select option",
        "group": "1c2e0ff9fd3d33d8",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "multiple": false,
        "options": [],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 1240,
        "y": 840,
        "wires": [
            [
                "6d465fa8d382fc24"
            ]
        ]
    },
    {
        "id": "a30ac88d9fdf90b4",
        "type": "change",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "options",
                "pt": "msg",
                "to": "$.payload.\"Order Type Code Description\"",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 700,
        "y": 840,
        "wires": [
            [
                "c0306414ac84339a",
                "2384ab8e6fc4f9c6"
            ]
        ]
    },
    {
        "id": "b99a78f1014f5d24",
        "type": "debug",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 670,
        "y": 700,
        "wires": []
    },
    {
        "id": "7b03f23ec5902921",
        "type": "comment",
        "z": "9b03cc7ebfdc5189",
        "name": "Drop Down to Select Task",
        "info": "",
        "x": 730,
        "y": 800,
        "wires": []
    },
    {
        "id": "c0306414ac84339a",
        "type": "function",
        "z": "9b03cc7ebfdc5189",
        "name": "Delete Duplicated Items",
        "func": "var items = msg.options\nlet unique = [ ...new Set(items)]\n\nmsg.options = unique\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 930,
        "y": 840,
        "wires": [
            [
                "253a33f4844238a1",
                "fccf5c6f1fbdd6d4"
            ]
        ]
    },
    {
        "id": "65ae502f0333ca70",
        "type": "comment",
        "z": "9b03cc7ebfdc5189",
        "name": "Read CSV File \"Standards\"",
        "info": "",
        "x": 110,
        "y": 700,
        "wires": []
    },
    {
        "id": "0aebf24c316dea36",
        "type": "comment",
        "z": "9b03cc7ebfdc5189",
        "name": "msg.payload = selected task",
        "info": "",
        "x": 1540,
        "y": 840,
        "wires": []
    },
    {
        "id": "fdb87e35622d251e",
        "type": "ui_dropdown",
        "z": "9b03cc7ebfdc5189",
        "name": "Drop Down Number of Employees on Packing Line",
        "label": "Number of Employees on Packing Line",
        "tooltip": "",
        "place": "Select option",
        "group": "1c2e0ff9fd3d33d8",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "multiple": false,
        "options": [],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 1270,
        "y": 960,
        "wires": [
            [
                "800d04b48c778463"
            ]
        ]
    },
    {
        "id": "ee50b68f4e1b9d79",
        "type": "comment",
        "z": "9b03cc7ebfdc5189",
        "name": "Drop Down to Select # of Employees",
        "info": "",
        "x": 760,
        "y": 920,
        "wires": []
    },
    {
        "id": "a61798580ae3ef30",
        "type": "function",
        "z": "9b03cc7ebfdc5189",
        "name": "Delete Duplicated Items",
        "func": "var items = msg.options\nlet unique = [ ...new Set(items)]\n\nmsg.options = unique\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 930,
        "y": 960,
        "wires": [
            [
                "fdb87e35622d251e",
                "f5edf549bac85543"
            ]
        ]
    },
    {
        "id": "49415244fb05dd4d",
        "type": "comment",
        "z": "9b03cc7ebfdc5189",
        "name": "msg.payload = selected task",
        "info": "",
        "x": 1600,
        "y": 960,
        "wires": []
    },
    {
        "id": "1c40ee1352c943b0",
        "type": "debug",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 720,
        "y": 1060,
        "wires": []
    },
    {
        "id": "2384ab8e6fc4f9c6",
        "type": "debug",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 900,
        "y": 760,
        "wires": []
    },
    {
        "id": "f5edf549bac85543",
        "type": "debug",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1100,
        "y": 1040,
        "wires": []
    },
    {
        "id": "fccf5c6f1fbdd6d4",
        "type": "debug",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1090,
        "y": 780,
        "wires": []
    },
    {
        "id": "da6d3fe21d3b98b3",
        "type": "change",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "options",
                "pt": "msg",
                "to": "$.payload.\"Actual # of Employees On Packing Line\"",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 700,
        "y": 960,
        "wires": [
            [
                "a61798580ae3ef30",
                "1c40ee1352c943b0"
            ]
        ]
    },
    {
        "id": "d446c5f28a9e1060",
        "type": "file in",
        "z": "9b03cc7ebfdc5189",
        "name": "config_line",
        "filename": "/home/dev/secured/ShippingStandards.csv",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 410,
        "y": 1340,
        "wires": [
            [
                "e052bf4599d98ea3"
            ]
        ]
    },
    {
        "id": "e052bf4599d98ea3",
        "type": "csv",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "sep": ",",
        "hdrin": false,
        "hdrout": "all",
        "multi": "mult",
        "ret": "\\n",
        "temp": "",
        "skip": "1",
        "strings": true,
        "include_empty_strings": false,
        "include_null_values": false,
        "x": 570,
        "y": 1340,
        "wires": [
            [
                "e477a853c1d11abf"
            ]
        ]
    },
    {
        "id": "e477a853c1d11abf",
        "type": "function",
        "z": "9b03cc7ebfdc5189",
        "name": "Create global array from CSV",
        "func": "global.set(\"arrr\",msg.payload)\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 790,
        "y": 1340,
        "wires": [
            [
                "25e3a281a26feb12",
                "988941d2fd75b6ac"
            ]
        ]
    },
    {
        "id": "25e3a281a26feb12",
        "type": "debug",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 980,
        "y": 1280,
        "wires": []
    },
    {
        "id": "907590c6a02af3f0",
        "type": "debug",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 1160,
        "y": 1280,
        "wires": []
    },
    {
        "id": "988941d2fd75b6ac",
        "type": "function",
        "z": "9b03cc7ebfdc5189",
        "name": "Parse Line",
        "func": "msg.payload = global.get(\"arrr[\"+flow.get(\"lineDisplay\")+\"].col4\")\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1030,
        "y": 1340,
        "wires": [
            [
                "907590c6a02af3f0",
                "c2f961f96889b542"
            ]
        ]
    },
    {
        "id": "c2f961f96889b542",
        "type": "ui_text",
        "z": "9b03cc7ebfdc5189",
        "group": "1c2e0ff9fd3d33d8",
        "order": 6,
        "width": 0,
        "height": 0,
        "name": "",
        "label": "Pots per Minute Actual Crew",
        "format": "{{msg.payload}}",
        "layout": "row-spread",
        "className": "",
        "x": 1250,
        "y": 1340,
        "wires": []
    },
    {
        "id": "800d04b48c778463",
        "type": "debug",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1500,
        "y": 1040,
        "wires": []
    },
    {
        "id": "6d465fa8d382fc24",
        "type": "debug",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1460,
        "y": 880,
        "wires": []
    },
    {
        "id": "c3d5b3642f2fa419",
        "type": "inject",
        "z": "9b03cc7ebfdc5189",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payloadType": "date",
        "x": 230,
        "y": 1340,
        "wires": [
            [
                "d446c5f28a9e1060"
            ]
        ]
    },
    {
        "id": "1c2e0ff9fd3d33d8",
        "type": "ui_group",
        "name": "Stand",
        "tab": "8c85a1ca378342da",
        "order": 1,
        "disp": true,
        "width": "10",
        "collapse": false,
        "className": ""
    },
    {
        "id": "8c85a1ca378342da",
        "type": "ui_tab",
        "name": "Read Standard test",
        "icon": "dashboard",
        "order": 16,
        "disabled": false,
        "hidden": false
    }
]

ShippingStandards.txt (3.7 KB)

can you supply the contents of the csv file so we can run the flow and test.

Thank you @E1cid I updated my original post to include the CSV as a .txt file so I can upload it on the form.
ShippingStandards.txt (3.7 KB)

Try this

[{"id":"fdb87e35622d251e","type":"ui_dropdown","z":"bf9e1e33.030598","name":"Drop Down Number of Employees on Packing Line","label":"Number of Employees on Packing Line","tooltip":"","place":"Select option","group":"1c2e0ff9fd3d33d8","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"actual","topicType":"str","className":"","x":1060,"y":4600,"wires":[["f6d79128.5027b8"]]},{"id":"da6d3fe21d3b98b3","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct($$.payload.actual)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":4600,"wires":[["1c40ee1352c943b0","fdb87e35622d251e"]]},{"id":"f6d79128.5027b8","type":"join","z":"bf9e1e33.030598","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1300,"y":4540,"wires":[["2fc64a9f.4264ee","6d465fa8d382fc24"]]},{"id":"25c2bd2842ef3426","type":"csv","z":"bf9e1e33.030598","name":"","sep":"\\t","hdrin":false,"hdrout":"all","multi":"mult","ret":"\n","temp":"code,standard,actual,pots,spots,tray","skip":"1","strings":true,"include_empty_strings":false,"include_null_values":false,"x":520,"y":4480,"wires":[["a30ac88d9fdf90b4","b99a78f1014f5d24","da6d3fe21d3b98b3"]]},{"id":"1c40ee1352c943b0","type":"debug","z":"bf9e1e33.030598","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":4680,"wires":[]},{"id":"253a33f4844238a1","type":"ui_dropdown","z":"bf9e1e33.030598","name":"Drop Down Order Type Code Description","label":"Order Type Code Description","tooltip":"","place":"Select option","group":"1c2e0ff9fd3d33d8","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"code","topicType":"str","className":"","x":1080,"y":4480,"wires":[["f6d79128.5027b8"]]},{"id":"2fc64a9f.4264ee","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$flowContext(\"csv\")[actual = $$.payload.actual and code = $$.payload.code]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1480,"y":4600,"wires":[["800d04b48c778463","c2f961f96889b542"]]},{"id":"6d465fa8d382fc24","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1490,"y":4520,"wires":[]},{"id":"44891ef2.d0a558","type":"template","z":"bf9e1e33.030598","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Order Type Code Description\tStandard # of Employees On Packing Line\tActual # of Employees On Packing Line\tPots per Minute Actual Crew\tStandard Pots per Minute 18 Crew Members\tTray / Box Pack\n3.8 Asst.\t18\t23\t137.51\t102.67\t18\n3.8 Asst.\t18\t22\t110\t102.67\t18\n3.8 Asst.\t18\t21\t108.65\t102.67\t18\n3.8 Asst.\t18\t20\t110.25\t102.67\t18\n3.8 Asst.\t18\t19\t109.26\t102.67\t18\n3.8 Asst.\t18\t18\t102.67\t102.67\t18\n3.8 Asst.\t18\t17\t98.66\t102.67\t18\n3.8 Asst.\t18\t16\t89.36\t102.67\t18\n3.8 Asst.\t18\t15\t90.49\t102.67\t18\n3.8 Asst.\t18\t14\t84.9\t102.67\t18\n3.8 Asst.\t18\t13\t77.56\t102.67\t18\n3.8 Asst.\t18\t12\t69.91\t102.67\t18\n3.8 Asst.\t18\t11\t69.25\t102.67\t18\n3.8 Asst.\t18\t10\t57.06\t102.67\t18\n3.8 Asst. WW\t18\t23\t94.5\t75.46\t18\n3.8 Asst. WW\t18\t22\t89.82\t75.46\t18\n3.8 Asst. WW\t18\t21\t87.09\t75.46\t18\n3.8 Asst. WW\t18\t20\t80.67\t75.46\t18\n3.8 Asst. WW\t18\t19\t79.21\t75.46\t18\n3.8 Asst. WW\t18\t18\t75.46\t75.46\t18\n3.8 Asst. WW\t18\t17\t70.78\t75.46\t18\n3.8 Asst. WW\t18\t16\t63.71\t75.46\t18\n3.8 Asst. WW\t18\t15\t61.99\t75.46\t18\n3.8 Asst. WW\t18\t14\t58.69\t75.46\t18\n3.8 Asst. WW\t18\t13\t55.11\t75.46\t18\n3.8 Asst. WW\t18\t12\t49.68\t75.46\t18\n3.8 Asst. WW\t18\t11\t44.23\t75.46\t18\n3.8 Asst. WW\t18\t10\t35.89\t75.46\t18\n4.4 Colorama Rack pack 120\t18\t23\t114.05\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t22\t119.25\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t21\t119.25\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t20\t106.83\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t19\t107.33\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t18\t101.14\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t17\t96.87\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t16\t96.87\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t15\t92.14\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t14\t70.5\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t13\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t12\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t11\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t10\t50.57\t105.14\t8\n3.8 Rack Pack 162\t18\t23\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t22\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t21\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t20\t76.21\t83.17\t18\n3.8 Rack Pack 162\t18\t19\t95.7\t83.17\t18\n3.8 Rack Pack 162\t18\t18\t83.17\t83.17\t18\n3.8 Rack Pack 162\t18\t17\t85.97\t83.17\t18\n3.8 Rack Pack 162\t18\t16\t70.45\t83.17\t18\n3.8 Rack Pack 162\t18\t15\t61.49\t83.17\t18\n3.8 Rack Pack 162\t18\t14\t54\t83.17\t18\n3.8 Rack Pack 162\t18\t13\t56.39\t83.17\t18\n3.8 Rack Pack 162\t18\t12\t56.39\t83.17\t18\n3.8 Rack Pack 162\t18\t11\t46.89\t83.17\t18\n3.8 Rack Pack 162\t18\t10\t33.52\t83.17\t18\nHand Pack\t2\t3\t27\t18\t18\nHand Pack\t2\t2\t18\t18\t18\nHand Pack\t2\t1\t9\t18\t18\nBuild Corugate Racks\t18\t3\t0.3\t3.9\t1\nBuild Corugate Racks\t18\t4\t0.33\t3.9\t1\nBuild Corugate Racks\t18\t5\t0.33\t3.9\t1\nBuild Corugate Racks\t18\t6\t0.57\t3.9\t1\nBuild Corugate Racks\t18\t7\t0.6\t3.9\t1\nBuild Corugate Racks\t18\t8\t0.7\t3.9\t1\nBuild Corugate Racks\t18\t9\t0.8\t3.9\t1\nBuild Corugate Racks\t18\t10\t0.9\t3.9\t1\nBuild Corugate Racks\t18\t11\t1\t3.9\t1\nBuild Corugate Racks\t18\t12\t1.1\t3.9\t1\nBuild Corugate Racks\t18\t13\t1.2\t3.9\t1\nBuild Corugate Racks\t18\t14\t1.3\t3.9\t1\nBuild Corugate Racks\t18\t15\t1.4\t3.9\t1\nBuild Corugate Racks\t18\t16\t3.45\t3.9\t1\nBuild Corugate Racks\t18\t17\t3.68\t3.9\t1\nBuild Corugate Racks\t18\t18\t3.9\t3.9\t1\nBuild Corugate Racks\t18\t19\t4.13\t3.9\t1\nBuild Corugate Racks\t18\t20\t4.35\t3.9\t1\nRe-Sticker Pots\t18\t1\t4\t1\t1\nRe-Sticker Pots\t18\t2\t8\t72\t1\nRe-Sticker Pots\t18\t3\t12\t72\t1\nRe-Sticker Pots\t18\t4\t16\t72\t1\nRe-Sticker Pots\t18\t5\t20\t72\t1\nRe-Sticker Pots\t18\t6\t24\t72\t1\nRe-Sticker Pots\t18\t7\t28\t72\t1\nRe-Sticker Pots\t18\t8\t32\t72\t1\nRe-Sticker Pots\t18\t9\t36\t72\t1\nRe-Sticker Pots\t18\t10\t40\t72\t1\nRe-Sticker Pots\t18\t11\t44\t72\t1\nRe-Sticker Pots\t18\t12\t48\t72\t1\nRe-Sticker Pots\t18\t13\t52\t72\t1\nRe-Sticker Pots\t18\t14\t56\t72\t1\nRe-Sticker Pots\t18\t15\t60\t72\t1\nRe-Sticker Pots\t18\t16\t64\t72\t1\nRe-Sticker Pots\t18\t17\t68\t72\t1\nRe-Sticker Pots\t18\t18\t72\t72\t1\nRe-Sticker Pots\t18\t19\t76\t72\t1\nRe-Sticker Pots\t18\t20\t80\t72\t1\n5 minute Huddle Per Day\t~\t~\t~\t~\t0","output":"str","x":350,"y":4480,"wires":[["25c2bd2842ef3426"]]},{"id":"a30ac88d9fdf90b4","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct($$.payload.code)","tot":"jsonata"},{"t":"set","p":"csv","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":4480,"wires":[["2384ab8e6fc4f9c6","253a33f4844238a1"]]},{"id":"b99a78f1014f5d24","type":"debug","z":"bf9e1e33.030598","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":700,"y":4340,"wires":[]},{"id":"800d04b48c778463","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1530,"y":4680,"wires":[]},{"id":"c2f961f96889b542","type":"ui_text","z":"bf9e1e33.030598","group":"1c2e0ff9fd3d33d8","order":6,"width":0,"height":0,"name":"","label":"Pots per Minute Actual Crew","format":"{{msg.payload.pots}}","layout":"row-spread","className":"","x":1110,"y":4680,"wires":[]},{"id":"ca84b1bc12776c8c","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":4480,"wires":[["44891ef2.d0a558"]]},{"id":"2384ab8e6fc4f9c6","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":930,"y":4400,"wires":[]},{"id":"1c2e0ff9fd3d33d8","type":"ui_group","name":"Stand","tab":"8c85a1ca378342da","order":1,"disp":true,"width":"10","collapse":false,"className":""},{"id":"8c85a1ca378342da","type":"ui_tab","name":"Read Standard test","icon":"dashboard","order":16,"disabled":false,"hidden":false}]

I have used a template node to simulate the file read, replace as needed.
I also updated your csv node to give easy column names , and added $distinct to your JSONata expressions to remove duplicates from the options.
p.s. Welcome to the forum.

[edit] filter actual depending on code.

[{"id":"25c2bd2842ef3426","type":"csv","z":"bf9e1e33.030598","name":"","sep":"\\t","hdrin":false,"hdrout":"all","multi":"mult","ret":"\n","temp":"code,standard,actual,pots,spots,tray","skip":"1","strings":true,"include_empty_strings":false,"include_null_values":false,"x":520,"y":4480,"wires":[["a30ac88d9fdf90b4","b99a78f1014f5d24"]]},{"id":"44891ef2.d0a558","type":"template","z":"bf9e1e33.030598","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Order Type Code Description\tStandard # of Employees On Packing Line\tActual # of Employees On Packing Line\tPots per Minute Actual Crew\tStandard Pots per Minute 18 Crew Members\tTray / Box Pack\n3.8 Asst.\t18\t23\t137.51\t102.67\t18\n3.8 Asst.\t18\t22\t110\t102.67\t18\n3.8 Asst.\t18\t21\t108.65\t102.67\t18\n3.8 Asst.\t18\t20\t110.25\t102.67\t18\n3.8 Asst.\t18\t19\t109.26\t102.67\t18\n3.8 Asst.\t18\t18\t102.67\t102.67\t18\n3.8 Asst.\t18\t17\t98.66\t102.67\t18\n3.8 Asst.\t18\t16\t89.36\t102.67\t18\n3.8 Asst.\t18\t15\t90.49\t102.67\t18\n3.8 Asst.\t18\t14\t84.9\t102.67\t18\n3.8 Asst.\t18\t13\t77.56\t102.67\t18\n3.8 Asst.\t18\t12\t69.91\t102.67\t18\n3.8 Asst.\t18\t11\t69.25\t102.67\t18\n3.8 Asst.\t18\t10\t57.06\t102.67\t18\n3.8 Asst. WW\t18\t23\t94.5\t75.46\t18\n3.8 Asst. WW\t18\t22\t89.82\t75.46\t18\n3.8 Asst. WW\t18\t21\t87.09\t75.46\t18\n3.8 Asst. WW\t18\t20\t80.67\t75.46\t18\n3.8 Asst. WW\t18\t19\t79.21\t75.46\t18\n3.8 Asst. WW\t18\t18\t75.46\t75.46\t18\n3.8 Asst. WW\t18\t17\t70.78\t75.46\t18\n3.8 Asst. WW\t18\t16\t63.71\t75.46\t18\n3.8 Asst. WW\t18\t15\t61.99\t75.46\t18\n3.8 Asst. WW\t18\t14\t58.69\t75.46\t18\n3.8 Asst. WW\t18\t13\t55.11\t75.46\t18\n3.8 Asst. WW\t18\t12\t49.68\t75.46\t18\n3.8 Asst. WW\t18\t11\t44.23\t75.46\t18\n3.8 Asst. WW\t18\t10\t35.89\t75.46\t18\n4.4 Colorama Rack pack 120\t18\t23\t114.05\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t22\t119.25\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t21\t119.25\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t20\t106.83\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t19\t107.33\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t18\t101.14\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t17\t96.87\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t16\t96.87\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t15\t92.14\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t14\t70.5\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t13\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t12\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t11\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t10\t50.57\t105.14\t8\n3.8 Rack Pack 162\t18\t23\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t22\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t21\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t20\t76.21\t83.17\t18\n3.8 Rack Pack 162\t18\t19\t95.7\t83.17\t18\n3.8 Rack Pack 162\t18\t18\t83.17\t83.17\t18\n3.8 Rack Pack 162\t18\t17\t85.97\t83.17\t18\n3.8 Rack Pack 162\t18\t16\t70.45\t83.17\t18\n3.8 Rack Pack 162\t18\t15\t61.49\t83.17\t18\n3.8 Rack Pack 162\t18\t14\t54\t83.17\t18\n3.8 Rack Pack 162\t18\t13\t56.39\t83.17\t18\n3.8 Rack Pack 162\t18\t12\t56.39\t83.17\t18\n3.8 Rack Pack 162\t18\t11\t46.89\t83.17\t18\n3.8 Rack Pack 162\t18\t10\t33.52\t83.17\t18\nHand Pack\t2\t3\t27\t18\t18\nHand Pack\t2\t2\t18\t18\t18\nHand Pack\t2\t1\t9\t18\t18\nBuild Corugate Racks\t18\t3\t0.3\t3.9\t1\nBuild Corugate Racks\t18\t4\t0.33\t3.9\t1\nBuild Corugate Racks\t18\t5\t0.33\t3.9\t1\nBuild Corugate Racks\t18\t6\t0.57\t3.9\t1\nBuild Corugate Racks\t18\t7\t0.6\t3.9\t1\nBuild Corugate Racks\t18\t8\t0.7\t3.9\t1\nBuild Corugate Racks\t18\t9\t0.8\t3.9\t1\nBuild Corugate Racks\t18\t10\t0.9\t3.9\t1\nBuild Corugate Racks\t18\t11\t1\t3.9\t1\nBuild Corugate Racks\t18\t12\t1.1\t3.9\t1\nBuild Corugate Racks\t18\t13\t1.2\t3.9\t1\nBuild Corugate Racks\t18\t14\t1.3\t3.9\t1\nBuild Corugate Racks\t18\t15\t1.4\t3.9\t1\nBuild Corugate Racks\t18\t16\t3.45\t3.9\t1\nBuild Corugate Racks\t18\t17\t3.68\t3.9\t1\nBuild Corugate Racks\t18\t18\t3.9\t3.9\t1\nBuild Corugate Racks\t18\t19\t4.13\t3.9\t1\nBuild Corugate Racks\t18\t20\t4.35\t3.9\t1\nRe-Sticker Pots\t18\t1\t4\t1\t1\nRe-Sticker Pots\t18\t2\t8\t72\t1\nRe-Sticker Pots\t18\t3\t12\t72\t1\nRe-Sticker Pots\t18\t4\t16\t72\t1\nRe-Sticker Pots\t18\t5\t20\t72\t1\nRe-Sticker Pots\t18\t6\t24\t72\t1\nRe-Sticker Pots\t18\t7\t28\t72\t1\nRe-Sticker Pots\t18\t8\t32\t72\t1\nRe-Sticker Pots\t18\t9\t36\t72\t1\nRe-Sticker Pots\t18\t10\t40\t72\t1\nRe-Sticker Pots\t18\t11\t44\t72\t1\nRe-Sticker Pots\t18\t12\t48\t72\t1\nRe-Sticker Pots\t18\t13\t52\t72\t1\nRe-Sticker Pots\t18\t14\t56\t72\t1\nRe-Sticker Pots\t18\t15\t60\t72\t1\nRe-Sticker Pots\t18\t16\t64\t72\t1\nRe-Sticker Pots\t18\t17\t68\t72\t1\nRe-Sticker Pots\t18\t18\t72\t72\t1\nRe-Sticker Pots\t18\t19\t76\t72\t1\nRe-Sticker Pots\t18\t20\t80\t72\t1\n5 minute Huddle Per Day\t~\t~\t~\t~\t0","output":"str","x":350,"y":4480,"wires":[["25c2bd2842ef3426"]]},{"id":"a30ac88d9fdf90b4","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct($$.payload.code)","tot":"jsonata"},{"t":"set","p":"csv","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":4480,"wires":[["2384ab8e6fc4f9c6","253a33f4844238a1"]]},{"id":"b99a78f1014f5d24","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":700,"y":4340,"wires":[]},{"id":"ca84b1bc12776c8c","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":4480,"wires":[["44891ef2.d0a558"]]},{"id":"2384ab8e6fc4f9c6","type":"debug","z":"bf9e1e33.030598","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":930,"y":4400,"wires":[]},{"id":"253a33f4844238a1","type":"ui_dropdown","z":"bf9e1e33.030598","name":"Drop Down Order Type Code Description","label":"Order Type Code Description","tooltip":"","place":"Select option","group":"1c2e0ff9fd3d33d8","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"code","topicType":"str","className":"","x":1080,"y":4460,"wires":[["da6d3fe21d3b98b3"]]},{"id":"da6d3fe21d3b98b3","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct($flowContext(\"csv\")[code = $$.payload].actual)","tot":"jsonata"},{"t":"set","p":"code","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":4600,"wires":[["1c40ee1352c943b0","fdb87e35622d251e"]]},{"id":"1c40ee1352c943b0","type":"debug","z":"bf9e1e33.030598","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":4680,"wires":[]},{"id":"fdb87e35622d251e","type":"ui_dropdown","z":"bf9e1e33.030598","name":"Drop Down Number of Employees on Packing Line","label":"Number of Employees on Packing Line","tooltip":"","place":"Select option","group":"1c2e0ff9fd3d33d8","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"actual","topicType":"str","className":"","x":1060,"y":4600,"wires":[["2fc64a9f.4264ee"]]},{"id":"2fc64a9f.4264ee","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"code","pt":"msg","to":"code","tot":"flow"},{"t":"set","p":"payload","pt":"msg","to":"$flowContext(\"csv\")[actual = $$.payload and code = $$.code]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":4600,"wires":[["800d04b48c778463","c2f961f96889b542"]]},{"id":"800d04b48c778463","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1530,"y":4680,"wires":[]},{"id":"c2f961f96889b542","type":"ui_text","z":"bf9e1e33.030598","group":"1c2e0ff9fd3d33d8","order":6,"width":0,"height":0,"name":"","label":"Pots per Minute Actual Crew","format":"{{msg.payload.pots}}","layout":"row-spread","className":"","x":1110,"y":4680,"wires":[]},{"id":"1c2e0ff9fd3d33d8","type":"ui_group","name":"Stand","tab":"8c85a1ca378342da","order":1,"disp":true,"width":"10","collapse":false,"className":""},{"id":"8c85a1ca378342da","type":"ui_tab","name":"Read Standard test","icon":"dashboard","order":16,"disabled":false,"hidden":false}]
1 Like

This is exactly what I was looking for thank you so much! I'll clean this up to fit the current code.

Also is there a way for the drop down "Number of Employees on Packing" to be filtered depending on what was selected in "Order Type Code Description"?

the filter function doesn't seem to work as expected. The pots per minute actual number does not change when selecting / changing Number of Employees on Packing.

You are correct the join is the issue as the code value is sent and therefore does not get to count 2 after the first run.
I stored the code in flow context and then retrieve it after the actual dropdown

[{"id":"25c2bd2842ef3426","type":"csv","z":"bf9e1e33.030598","name":"","sep":"\\t","hdrin":false,"hdrout":"all","multi":"mult","ret":"\n","temp":"code,standard,actual,pots,spots,tray","skip":"1","strings":true,"include_empty_strings":false,"include_null_values":false,"x":520,"y":4480,"wires":[["a30ac88d9fdf90b4","b99a78f1014f5d24"]]},{"id":"44891ef2.d0a558","type":"template","z":"bf9e1e33.030598","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Order Type Code Description\tStandard # of Employees On Packing Line\tActual # of Employees On Packing Line\tPots per Minute Actual Crew\tStandard Pots per Minute 18 Crew Members\tTray / Box Pack\n3.8 Asst.\t18\t23\t137.51\t102.67\t18\n3.8 Asst.\t18\t22\t110\t102.67\t18\n3.8 Asst.\t18\t21\t108.65\t102.67\t18\n3.8 Asst.\t18\t20\t110.25\t102.67\t18\n3.8 Asst.\t18\t19\t109.26\t102.67\t18\n3.8 Asst.\t18\t18\t102.67\t102.67\t18\n3.8 Asst.\t18\t17\t98.66\t102.67\t18\n3.8 Asst.\t18\t16\t89.36\t102.67\t18\n3.8 Asst.\t18\t15\t90.49\t102.67\t18\n3.8 Asst.\t18\t14\t84.9\t102.67\t18\n3.8 Asst.\t18\t13\t77.56\t102.67\t18\n3.8 Asst.\t18\t12\t69.91\t102.67\t18\n3.8 Asst.\t18\t11\t69.25\t102.67\t18\n3.8 Asst.\t18\t10\t57.06\t102.67\t18\n3.8 Asst. WW\t18\t23\t94.5\t75.46\t18\n3.8 Asst. WW\t18\t22\t89.82\t75.46\t18\n3.8 Asst. WW\t18\t21\t87.09\t75.46\t18\n3.8 Asst. WW\t18\t20\t80.67\t75.46\t18\n3.8 Asst. WW\t18\t19\t79.21\t75.46\t18\n3.8 Asst. WW\t18\t18\t75.46\t75.46\t18\n3.8 Asst. WW\t18\t17\t70.78\t75.46\t18\n3.8 Asst. WW\t18\t16\t63.71\t75.46\t18\n3.8 Asst. WW\t18\t15\t61.99\t75.46\t18\n3.8 Asst. WW\t18\t14\t58.69\t75.46\t18\n3.8 Asst. WW\t18\t13\t55.11\t75.46\t18\n3.8 Asst. WW\t18\t12\t49.68\t75.46\t18\n3.8 Asst. WW\t18\t11\t44.23\t75.46\t18\n3.8 Asst. WW\t18\t10\t35.89\t75.46\t18\n4.4 Colorama Rack pack 120\t18\t23\t114.05\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t22\t119.25\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t21\t119.25\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t20\t106.83\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t19\t107.33\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t18\t101.14\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t17\t96.87\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t16\t96.87\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t15\t92.14\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t14\t70.5\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t13\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t12\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t11\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t10\t50.57\t105.14\t8\n3.8 Rack Pack 162\t18\t23\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t22\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t21\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t20\t76.21\t83.17\t18\n3.8 Rack Pack 162\t18\t19\t95.7\t83.17\t18\n3.8 Rack Pack 162\t18\t18\t83.17\t83.17\t18\n3.8 Rack Pack 162\t18\t17\t85.97\t83.17\t18\n3.8 Rack Pack 162\t18\t16\t70.45\t83.17\t18\n3.8 Rack Pack 162\t18\t15\t61.49\t83.17\t18\n3.8 Rack Pack 162\t18\t14\t54\t83.17\t18\n3.8 Rack Pack 162\t18\t13\t56.39\t83.17\t18\n3.8 Rack Pack 162\t18\t12\t56.39\t83.17\t18\n3.8 Rack Pack 162\t18\t11\t46.89\t83.17\t18\n3.8 Rack Pack 162\t18\t10\t33.52\t83.17\t18\nHand Pack\t2\t3\t27\t18\t18\nHand Pack\t2\t2\t18\t18\t18\nHand Pack\t2\t1\t9\t18\t18\nBuild Corugate Racks\t18\t3\t0.3\t3.9\t1\nBuild Corugate Racks\t18\t4\t0.33\t3.9\t1\nBuild Corugate Racks\t18\t5\t0.33\t3.9\t1\nBuild Corugate Racks\t18\t6\t0.57\t3.9\t1\nBuild Corugate Racks\t18\t7\t0.6\t3.9\t1\nBuild Corugate Racks\t18\t8\t0.7\t3.9\t1\nBuild Corugate Racks\t18\t9\t0.8\t3.9\t1\nBuild Corugate Racks\t18\t10\t0.9\t3.9\t1\nBuild Corugate Racks\t18\t11\t1\t3.9\t1\nBuild Corugate Racks\t18\t12\t1.1\t3.9\t1\nBuild Corugate Racks\t18\t13\t1.2\t3.9\t1\nBuild Corugate Racks\t18\t14\t1.3\t3.9\t1\nBuild Corugate Racks\t18\t15\t1.4\t3.9\t1\nBuild Corugate Racks\t18\t16\t3.45\t3.9\t1\nBuild Corugate Racks\t18\t17\t3.68\t3.9\t1\nBuild Corugate Racks\t18\t18\t3.9\t3.9\t1\nBuild Corugate Racks\t18\t19\t4.13\t3.9\t1\nBuild Corugate Racks\t18\t20\t4.35\t3.9\t1\nRe-Sticker Pots\t18\t1\t4\t1\t1\nRe-Sticker Pots\t18\t2\t8\t72\t1\nRe-Sticker Pots\t18\t3\t12\t72\t1\nRe-Sticker Pots\t18\t4\t16\t72\t1\nRe-Sticker Pots\t18\t5\t20\t72\t1\nRe-Sticker Pots\t18\t6\t24\t72\t1\nRe-Sticker Pots\t18\t7\t28\t72\t1\nRe-Sticker Pots\t18\t8\t32\t72\t1\nRe-Sticker Pots\t18\t9\t36\t72\t1\nRe-Sticker Pots\t18\t10\t40\t72\t1\nRe-Sticker Pots\t18\t11\t44\t72\t1\nRe-Sticker Pots\t18\t12\t48\t72\t1\nRe-Sticker Pots\t18\t13\t52\t72\t1\nRe-Sticker Pots\t18\t14\t56\t72\t1\nRe-Sticker Pots\t18\t15\t60\t72\t1\nRe-Sticker Pots\t18\t16\t64\t72\t1\nRe-Sticker Pots\t18\t17\t68\t72\t1\nRe-Sticker Pots\t18\t18\t72\t72\t1\nRe-Sticker Pots\t18\t19\t76\t72\t1\nRe-Sticker Pots\t18\t20\t80\t72\t1\n5 minute Huddle Per Day\t~\t~\t~\t~\t0","output":"str","x":350,"y":4480,"wires":[["25c2bd2842ef3426"]]},{"id":"a30ac88d9fdf90b4","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct($$.payload.code)","tot":"jsonata"},{"t":"set","p":"csv","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":4480,"wires":[["2384ab8e6fc4f9c6","253a33f4844238a1"]]},{"id":"b99a78f1014f5d24","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":700,"y":4340,"wires":[]},{"id":"ca84b1bc12776c8c","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":4480,"wires":[["44891ef2.d0a558"]]},{"id":"2384ab8e6fc4f9c6","type":"debug","z":"bf9e1e33.030598","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":930,"y":4400,"wires":[]},{"id":"253a33f4844238a1","type":"ui_dropdown","z":"bf9e1e33.030598","name":"Drop Down Order Type Code Description","label":"Order Type Code Description","tooltip":"","place":"Select option","group":"1c2e0ff9fd3d33d8","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"code","topicType":"str","className":"","x":1080,"y":4460,"wires":[["da6d3fe21d3b98b3"]]},{"id":"da6d3fe21d3b98b3","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct($flowContext(\"csv\")[code = $$.payload].actual)","tot":"jsonata"},{"t":"set","p":"code","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":4600,"wires":[["1c40ee1352c943b0","fdb87e35622d251e"]]},{"id":"1c40ee1352c943b0","type":"debug","z":"bf9e1e33.030598","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":4680,"wires":[]},{"id":"fdb87e35622d251e","type":"ui_dropdown","z":"bf9e1e33.030598","name":"Drop Down Number of Employees on Packing Line","label":"Number of Employees on Packing Line","tooltip":"","place":"Select option","group":"1c2e0ff9fd3d33d8","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"actual","topicType":"str","className":"","x":1060,"y":4600,"wires":[["2fc64a9f.4264ee"]]},{"id":"2fc64a9f.4264ee","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"code","pt":"msg","to":"code","tot":"flow"},{"t":"set","p":"payload","pt":"msg","to":"$flowContext(\"csv\")[actual = $$.payload and code = $$.code]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":4600,"wires":[["800d04b48c778463","c2f961f96889b542"]]},{"id":"800d04b48c778463","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1530,"y":4680,"wires":[]},{"id":"c2f961f96889b542","type":"ui_text","z":"bf9e1e33.030598","group":"1c2e0ff9fd3d33d8","order":6,"width":0,"height":0,"name":"","label":"Pots per Minute Actual Crew","format":"{{msg.payload.pots}}","layout":"row-spread","className":"","x":1110,"y":4680,"wires":[]},{"id":"1c2e0ff9fd3d33d8","type":"ui_group","name":"Stand","tab":"8c85a1ca378342da","order":1,"disp":true,"width":"10","collapse":false,"className":""},{"id":"8c85a1ca378342da","type":"ui_tab","name":"Read Standard test","icon":"dashboard","order":16,"disabled":false,"hidden":false}]

I have updated the other post as well.

or this version, which passes the code in the actual msg.options.
The Jsonata is a little more complicated to build the actual options.

[{"id":"fdb87e35622d251e","type":"ui_dropdown","z":"bf9e1e33.030598","name":"Drop Down Number of Employees on Packing Line","label":"Number of Employees on Packing Line","tooltip":"","place":"Select option","group":"1c2e0ff9fd3d33d8","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"actual","topicType":"str","className":"","x":1060,"y":4600,"wires":[["2fc64a9f.4264ee"]]},{"id":"da6d3fe21d3b98b3","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct($flowContext(\"csv\")[code = $$.payload].actual).{$string($): {\"code\": $$.payload, \"actual\": $}}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":4600,"wires":[["1c40ee1352c943b0","fdb87e35622d251e"]]},{"id":"2fc64a9f.4264ee","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$flowContext(\"csv\")[actual = $$.payload.actual and code = $$.payload.code]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1480,"y":4600,"wires":[["800d04b48c778463","c2f961f96889b542"]]},{"id":"253a33f4844238a1","type":"ui_dropdown","z":"bf9e1e33.030598","name":"Drop Down Order Type Code Description","label":"Order Type Code Description","tooltip":"","place":"Select option","group":"1c2e0ff9fd3d33d8","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"code","topicType":"str","className":"","x":1080,"y":4460,"wires":[["da6d3fe21d3b98b3"]]},{"id":"1c40ee1352c943b0","type":"debug","z":"bf9e1e33.030598","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":4680,"wires":[]},{"id":"800d04b48c778463","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1530,"y":4680,"wires":[]},{"id":"c2f961f96889b542","type":"ui_text","z":"bf9e1e33.030598","group":"1c2e0ff9fd3d33d8","order":6,"width":0,"height":0,"name":"","label":"Pots per Minute Actual Crew","format":"{{msg.payload.pots}}","layout":"row-spread","className":"","x":1110,"y":4680,"wires":[]},{"id":"a30ac88d9fdf90b4","type":"change","z":"bf9e1e33.030598","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct($$.payload.code)","tot":"jsonata"},{"t":"set","p":"csv","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":4480,"wires":[["2384ab8e6fc4f9c6","253a33f4844238a1"]]},{"id":"25c2bd2842ef3426","type":"csv","z":"bf9e1e33.030598","name":"","sep":"\\t","hdrin":false,"hdrout":"all","multi":"mult","ret":"\n","temp":"code,standard,actual,pots,spots,tray","skip":"1","strings":true,"include_empty_strings":false,"include_null_values":false,"x":520,"y":4480,"wires":[["a30ac88d9fdf90b4","b99a78f1014f5d24"]]},{"id":"2384ab8e6fc4f9c6","type":"debug","z":"bf9e1e33.030598","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":930,"y":4400,"wires":[]},{"id":"44891ef2.d0a558","type":"template","z":"bf9e1e33.030598","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Order Type Code Description\tStandard # of Employees On Packing Line\tActual # of Employees On Packing Line\tPots per Minute Actual Crew\tStandard Pots per Minute 18 Crew Members\tTray / Box Pack\n3.8 Asst.\t18\t23\t137.51\t102.67\t18\n3.8 Asst.\t18\t22\t110\t102.67\t18\n3.8 Asst.\t18\t21\t108.65\t102.67\t18\n3.8 Asst.\t18\t20\t110.25\t102.67\t18\n3.8 Asst.\t18\t19\t109.26\t102.67\t18\n3.8 Asst.\t18\t18\t102.67\t102.67\t18\n3.8 Asst.\t18\t17\t98.66\t102.67\t18\n3.8 Asst.\t18\t16\t89.36\t102.67\t18\n3.8 Asst.\t18\t15\t90.49\t102.67\t18\n3.8 Asst.\t18\t14\t84.9\t102.67\t18\n3.8 Asst.\t18\t13\t77.56\t102.67\t18\n3.8 Asst.\t18\t12\t69.91\t102.67\t18\n3.8 Asst.\t18\t11\t69.25\t102.67\t18\n3.8 Asst.\t18\t10\t57.06\t102.67\t18\n3.8 Asst. WW\t18\t23\t94.5\t75.46\t18\n3.8 Asst. WW\t18\t22\t89.82\t75.46\t18\n3.8 Asst. WW\t18\t21\t87.09\t75.46\t18\n3.8 Asst. WW\t18\t20\t80.67\t75.46\t18\n3.8 Asst. WW\t18\t19\t79.21\t75.46\t18\n3.8 Asst. WW\t18\t18\t75.46\t75.46\t18\n3.8 Asst. WW\t18\t17\t70.78\t75.46\t18\n3.8 Asst. WW\t18\t16\t63.71\t75.46\t18\n3.8 Asst. WW\t18\t15\t61.99\t75.46\t18\n3.8 Asst. WW\t18\t14\t58.69\t75.46\t18\n3.8 Asst. WW\t18\t13\t55.11\t75.46\t18\n3.8 Asst. WW\t18\t12\t49.68\t75.46\t18\n3.8 Asst. WW\t18\t11\t44.23\t75.46\t18\n3.8 Asst. WW\t18\t10\t35.89\t75.46\t18\n4.4 Colorama Rack pack 120\t18\t23\t114.05\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t22\t119.25\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t21\t119.25\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t20\t106.83\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t19\t107.33\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t18\t101.14\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t17\t96.87\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t16\t96.87\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t15\t92.14\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t14\t70.5\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t13\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t12\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t11\t75.56\t105.14\t8\n4.4 Colorama Rack pack 120\t18\t10\t50.57\t105.14\t8\n3.8 Rack Pack 162\t18\t23\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t22\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t21\t107.46\t83.17\t18\n3.8 Rack Pack 162\t18\t20\t76.21\t83.17\t18\n3.8 Rack Pack 162\t18\t19\t95.7\t83.17\t18\n3.8 Rack Pack 162\t18\t18\t83.17\t83.17\t18\n3.8 Rack Pack 162\t18\t17\t85.97\t83.17\t18\n3.8 Rack Pack 162\t18\t16\t70.45\t83.17\t18\n3.8 Rack Pack 162\t18\t15\t61.49\t83.17\t18\n3.8 Rack Pack 162\t18\t14\t54\t83.17\t18\n3.8 Rack Pack 162\t18\t13\t56.39\t83.17\t18\n3.8 Rack Pack 162\t18\t12\t56.39\t83.17\t18\n3.8 Rack Pack 162\t18\t11\t46.89\t83.17\t18\n3.8 Rack Pack 162\t18\t10\t33.52\t83.17\t18\nHand Pack\t2\t3\t27\t18\t18\nHand Pack\t2\t2\t18\t18\t18\nHand Pack\t2\t1\t9\t18\t18\nBuild Corugate Racks\t18\t3\t0.3\t3.9\t1\nBuild Corugate Racks\t18\t4\t0.33\t3.9\t1\nBuild Corugate Racks\t18\t5\t0.33\t3.9\t1\nBuild Corugate Racks\t18\t6\t0.57\t3.9\t1\nBuild Corugate Racks\t18\t7\t0.6\t3.9\t1\nBuild Corugate Racks\t18\t8\t0.7\t3.9\t1\nBuild Corugate Racks\t18\t9\t0.8\t3.9\t1\nBuild Corugate Racks\t18\t10\t0.9\t3.9\t1\nBuild Corugate Racks\t18\t11\t1\t3.9\t1\nBuild Corugate Racks\t18\t12\t1.1\t3.9\t1\nBuild Corugate Racks\t18\t13\t1.2\t3.9\t1\nBuild Corugate Racks\t18\t14\t1.3\t3.9\t1\nBuild Corugate Racks\t18\t15\t1.4\t3.9\t1\nBuild Corugate Racks\t18\t16\t3.45\t3.9\t1\nBuild Corugate Racks\t18\t17\t3.68\t3.9\t1\nBuild Corugate Racks\t18\t18\t3.9\t3.9\t1\nBuild Corugate Racks\t18\t19\t4.13\t3.9\t1\nBuild Corugate Racks\t18\t20\t4.35\t3.9\t1\nRe-Sticker Pots\t18\t1\t4\t1\t1\nRe-Sticker Pots\t18\t2\t8\t72\t1\nRe-Sticker Pots\t18\t3\t12\t72\t1\nRe-Sticker Pots\t18\t4\t16\t72\t1\nRe-Sticker Pots\t18\t5\t20\t72\t1\nRe-Sticker Pots\t18\t6\t24\t72\t1\nRe-Sticker Pots\t18\t7\t28\t72\t1\nRe-Sticker Pots\t18\t8\t32\t72\t1\nRe-Sticker Pots\t18\t9\t36\t72\t1\nRe-Sticker Pots\t18\t10\t40\t72\t1\nRe-Sticker Pots\t18\t11\t44\t72\t1\nRe-Sticker Pots\t18\t12\t48\t72\t1\nRe-Sticker Pots\t18\t13\t52\t72\t1\nRe-Sticker Pots\t18\t14\t56\t72\t1\nRe-Sticker Pots\t18\t15\t60\t72\t1\nRe-Sticker Pots\t18\t16\t64\t72\t1\nRe-Sticker Pots\t18\t17\t68\t72\t1\nRe-Sticker Pots\t18\t18\t72\t72\t1\nRe-Sticker Pots\t18\t19\t76\t72\t1\nRe-Sticker Pots\t18\t20\t80\t72\t1\n5 minute Huddle Per Day\t~\t~\t~\t~\t0","output":"str","x":350,"y":4480,"wires":[["25c2bd2842ef3426"]]},{"id":"b99a78f1014f5d24","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":700,"y":4340,"wires":[]},{"id":"ca84b1bc12776c8c","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":4480,"wires":[["44891ef2.d0a558"]]},{"id":"1c2e0ff9fd3d33d8","type":"ui_group","name":"Stand","tab":"8c85a1ca378342da","order":1,"disp":true,"width":"10","collapse":false,"className":""},{"id":"8c85a1ca378342da","type":"ui_tab","name":"Read Standard test","icon":"dashboard","order":16,"disabled":false,"hidden":false}]
1 Like

Thank you so much for the help!!!!! :grinning:

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