Select value from CSV file

expand the options in that debug and then post flow un edited.

You mean like this?

post the flow please.
everything looks fine so may be an setting in the dropdown node.
What version of Node-red are you using? and Dashboard?

I have node red version v1.1.3.
node-red-dashboard 2.23.3

The flow:

[{"id":"c4bf66.1cb1f098","type":"inject","z":"b4370c04.a6c7d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":1780,"wires":[["4387474c.b83518"]]},{"id":"4387474c.b83518","type":"template","z":"b4370c04.a6c7d","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"product,takt\nball,20\ntrain,30\nhat,60","output":"str","x":200,"y":1860,"wires":[["ea6d82b9.900608"]]},{"id":"ea6d82b9.900608","type":"csv","z":"b4370c04.a6c7d","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":320,"y":1900,"wires":[["6cf510bb.a9b408"]]},{"id":"6cf510bb.a9b408","type":"change","z":"b4370c04.a6c7d","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"payload.{product: $}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":1900,"wires":[["791af232.1e9dcc","224de115.06a916"]]},{"id":"791af232.1e9dcc","type":"ui_dropdown","z":"b4370c04.a6c7d","name":"","label":"test","tooltip":"","place":"Select option","group":"a01cca30.f7142","order":4,"width":0,"height":0,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"topic","x":720,"y":1900,"wires":[["224de115.06a916"]]},{"id":"224de115.06a916","type":"debug","z":"b4370c04.a6c7d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":650,"y":1820,"wires":[]},{"id":"a01cca30.f7142","type":"ui_group","name":"","tab":"4da6c120.9c3648","order":1,"disp":true,"width":"6","collapse":false},{"id":"4da6c120.9c3648","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

May be your versions are to old. try updating dashboard to 2.29.0. If that does not work then you will have to update node-red.
also test this flow for possible workaround.

[{"id":"ea6d82b9.900608","type":"csv","z":"9b3f9f31.c45298","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":370,"y":2120,"wires":[["6cf510bb.a9b408"]]},{"id":"4387474c.b83518","type":"template","z":"9b3f9f31.c45298","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"product,takt\nball,20\ntrain,30\nhat,60","output":"str","x":250,"y":2080,"wires":[["ea6d82b9.900608"]]},{"id":"6cf510bb.a9b408","type":"change","z":"9b3f9f31.c45298","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"payload.{product: $string($)}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":2120,"wires":[["791af232.1e9dcc","224de115.06a916"]]},{"id":"c4bf66.1cb1f098","type":"inject","z":"9b3f9f31.c45298","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":230,"y":2000,"wires":[["4387474c.b83518"]]},{"id":"791af232.1e9dcc","type":"ui_dropdown","z":"9b3f9f31.c45298","name":"","label":"test","tooltip":"","place":"Select option","group":"a01cca30.f7142","order":4,"width":0,"height":0,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"topic","x":770,"y":2120,"wires":[["224de115.06a916"]]},{"id":"224de115.06a916","type":"debug","z":"9b3f9f31.c45298","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":700,"y":2040,"wires":[]},{"id":"a01cca30.f7142","type":"ui_group","name":"","tab":"4da6c120.9c3648","order":1,"disp":true,"width":"6","collapse":false},{"id":"4da6c120.9c3648","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

I updated the dashboard node to 2.29.0 and now it is working!
Thank you very much!

Hello @E1cid,

I want to extend the options with a second dropdown menu.
When I select product "ball" I want to select in another dropdown node the type of the ball.

This is the flow that I created::

[{"id":"8c0623de.87ca1","type":"inject","z":"b4370c04.a6c7d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":2640,"wires":[["3ce8055d.54a18a"]]},{"id":"3ce8055d.54a18a","type":"template","z":"b4370c04.a6c7d","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"product,ball,train,hat\nball,baseball,yellowtrain,bighat\ntrain ,football,bluetrain,smallhat\nhat,tennisball,redtrain,mediumhat","output":"str","x":280,"y":2680,"wires":[["a1092c24.2d9c8"]]},{"id":"a1092c24.2d9c8","type":"csv","z":"b4370c04.a6c7d","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":430,"y":2680,"wires":[["710b3dda.63a9b4","36d6405f.fb078","c348b469.19c818"]]},{"id":"710b3dda.63a9b4","type":"change","z":"b4370c04.a6c7d","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"payload.{product: product}","tot":"jsonata"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":2680,"wires":[["41316f23.24fc1"]]},{"id":"41316f23.24fc1","type":"ui_dropdown","z":"b4370c04.a6c7d","name":"","label":"product","tooltip":"","place":"Select option","group":"7da9517d.305a1","order":4,"width":0,"height":0,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"topic","topicType":"msg","x":820,"y":2680,"wires":[["3fbad61f.c17efa","8835f550.6d4fb"]]},{"id":"3fbad61f.c17efa","type":"debug","z":"b4370c04.a6c7d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":970,"y":2620,"wires":[]},{"id":"36d6405f.fb078","type":"debug","z":"b4370c04.a6c7d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":2620,"wires":[]},{"id":"c348b469.19c818","type":"change","z":"b4370c04.a6c7d","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"payload.{msg.product: msg.product}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":2760,"wires":[["28949ca7.79c294","6def0228.d2382c"]]},{"id":"28949ca7.79c294","type":"ui_dropdown","z":"b4370c04.a6c7d","name":"","label":"type","tooltip":"","place":"Select option","group":"7da9517d.305a1","order":4,"width":0,"height":0,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"topic","topicType":"msg","x":850,"y":2760,"wires":[[]]},{"id":"6def0228.d2382c","type":"debug","z":"b4370c04.a6c7d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":910,"y":2840,"wires":[]},{"id":"8835f550.6d4fb","type":"change","z":"b4370c04.a6c7d","name":"","rules":[{"t":"set","p":"product","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1070,"y":2700,"wires":[["a34961c7.b9cb78","c348b469.19c818"]]},{"id":"a34961c7.b9cb78","type":"debug","z":"b4370c04.a6c7d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"product","targetType":"msg","statusVal":"","statusType":"auto","x":1310,"y":2680,"wires":[]},{"id":"7da9517d.305a1","type":"ui_group","name":"","tab":"1ea6ab39.e574b5","order":1,"disp":true,"width":"6","collapse":false},{"id":"1ea6ab39.e574b5","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

.

Below are the options from a CSV file I want to choose from.

When I select product 'ball', I tried to use the string 'ball' in msg.product to use msg.product as a selector from the dropdown menu. But that doesn't works.

What am I doing wrong?

Schermafbeelding 2021-05-10 om 18.10.55

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