Dropdown node cuts a "0" at the end

[{"id":"8db0322a.4cc4d","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"f2042e3d.90c87","type":"ui_dropdown","z":"8db0322a.4cc4d","name":"","label":"selection","tooltip":"","place":"Select option","group":"807b5c7.909b2a","order":12,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"topic","topicType":"msg","x":680,"y":240,"wires":[["29a91919.2b6b46"]]},{"id":"9bd7e49e.1dbab8","type":"function","z":"8db0322a.4cc4d","name":"transform data to correct format","func":"//as per info panel, the data needs to be formatted\n//as [ \"Choice 1\", \"Choice 2\", {\"Choice 3\":\"3\"} ]\n//and sent in msg.options.\nmsg.options = [];//create empty array\nfor(let i = 0; i < msg.payload.length; i++){\n    let row = (msg.payload[i]); //get the row\n    let opt = {};//make new opt object\n    opt[row[0]] = (row[1] +=\"$\"); //add a propery to object called row[0] & set its value to row[1]\n    //the +=\"$\" is added to force every row to a string in the dropdown after \n    msg.options.push(opt);//add the opt to array    \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":370,"y":240,"wires":[["f2042e3d.90c87"]]},{"id":"510f0df8.dafec4","type":"inject","z":"8db0322a.4cc4d","name":"Fake DB Result","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"[[\"123-134M\",\"123-134M\"],[\"44750\",\"44750\"],[\"33640.20\",\"33640.20\"],[\"35789.30\",\"35789.30\"],[\"23456.10\",\"23456.10\"]]","payloadType":"json","x":120,"y":240,"wires":[["9bd7e49e.1dbab8"]]},{"id":"d4687052.28546","type":"ui_text","z":"8db0322a.4cc4d","group":"807b5c7.909b2a","order":1,"width":0,"height":0,"name":"","label":"articel","format":"{{msg.payload}}","layout":"row-spread","x":610,"y":360,"wires":[]},{"id":"29a91919.2b6b46","type":"function","z":"8db0322a.4cc4d","name":"transform dropdown message","func":"tx = msg.payload;\ntx = tx.substr(0, tx.length - 1);\nmsg.payload = tx;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":370,"y":360,"wires":[["d4687052.28546"]]},{"id":"77c3f933.4bb528","type":"comment","z":"8db0322a.4cc4d","name":"add an \"$\" to every value","info":"","x":370,"y":200,"wires":[]},{"id":"b3bf38a.04a90c8","type":"comment","z":"8db0322a.4cc4d","name":"\"$\" lets dropdown recognize string only","info":"","x":690,"y":200,"wires":[]},{"id":"98cfba9c.d15eb8","type":"comment","z":"8db0322a.4cc4d","name":"reduce \"$\" from the end","info":"","x":370,"y":320,"wires":[]},{"id":"807b5c7.909b2a","type":"ui_group","name":"Group 1","tab":"4b4528d.4e9cad8","order":1,"disp":true,"width":6},{"id":"4b4528d.4e9cad8","type":"ui_tab","name":"Example","icon":"dashboard","order":8,"disabled":false,"hidden":false}]

This is how i solved it in the meantime.
Works fine for me.
Thanks to all who helped to solve it!

Tim

Hello dceejay,

fix 2.29.1 works for me.

Thanks a lot

Tim

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