Muliply values from Dropdown menu

Greetings, I am new here and I wanted to add 3 values selected from dropdown. Like, there are 3 dropdowns and I want to multiply selected options and show result in ui.
I tried my best but failed.
Kindly do help me. Looking forward to your great response.

Show us what you have so far and post your flow. So that we know how close you are and where you might have done something wrong :blush:

Stay healthy, Johannes

If you need to combine values from three different dropdown nodes then first you have to make all three values accessible in one place. A good way to do that is described in the cookbook post on joining streams. Import the example there and try it to see how it works, then you should be able to adapt it to your needs.

No need, you can use the ui-form node where you can add as many input fields as you want and once you press the button you already have them in one msg object.

Does the Form node have a dropdown box?

1 Like

No, good point @Colin :+1: but you can directly put in numbers. Yes your way will be better if you want to limit the selection of available multipliers with a dropdown.

I have tried and it worked in this way. Thank you for help. :heart_eyes: :heart_eyes:

flow link:

[{"id":"e8d8c2f8.8dadb","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"6413106e.9db09","type":"ui_dropdown","z":"e8d8c2f8.8dadb","name":"Severity Rating","label":"Severity Rating","tooltip":"","place":"Select option 1","group":"2ad8ccc0.768104","order":2,"width":0,"height":0,"passthru":true,"options":[{"label":"Hazardous w/o Warning","value":10,"type":"num"},{"label":"Hazardous with Warning","value":9,"type":"num"},{"label":"Very High","value":8,"type":"num"},{"label":"High","value":7,"type":"num"},{"label":"Moderate","value":6,"type":"num"},{"label":"Low","value":5,"type":"num"},{"label":"Very Low","value":4,"type":"num"},{"label":"Minor","value":3,"type":"num"},{"label":"Very Minor","value":2,"type":"num"},{"label":"None","value":1,"type":"num"}],"payload":"","topic":"s1","x":120,"y":200,"wires":[["b0496f48.3bc85"]]},{"id":"dc80aea0.b9f3e","type":"ui_button","z":"e8d8c2f8.8dadb","name":"","group":"2ad8ccc0.768104","order":5,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":110,"y":420,"wires":[["10ca3b29.2b52f5"]]},{"id":"cf3fc0ef.8904f","type":"ui_dropdown","z":"e8d8c2f8.8dadb","name":"Probability of Detection Rating","label":"Probability of Detection Rating","tooltip":"","place":"Select option 2","group":"2ad8ccc0.768104","order":3,"width":0,"height":0,"passthru":true,"options":[{"label":"Total Uncertainity","value":10,"type":"num"},{"label":"Very Remote","value":9,"type":"num"},{"label":"Remote","value":8,"type":"num"},{"label":"Very Low","value":7,"type":"num"},{"label":"Low","value":6,"type":"num"},{"label":"Moderate","value":5,"type":"num"},{"label":"Moderately High","value":4,"type":"num"},{"label":"High","value":3,"type":"num"},{"label":"Very High","value":2,"type":"num"},{"label":"Total Certainity","value":1,"type":"num"}],"payload":"","topic":"s2","x":180,"y":260,"wires":[["b0496f48.3bc85"]]},{"id":"b0496f48.3bc85","type":"join","z":"e8d8c2f8.8dadb","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"1","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":370,"y":160,"wires":[["2c81f8e3.01f188"]]},{"id":"349d1898.a27438","type":"change","z":"e8d8c2f8.8dadb","name":"","rules":[{"t":"set","p":"selected","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":220,"wires":[[]]},{"id":"10ca3b29.2b52f5","type":"change","z":"e8d8c2f8.8dadb","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"selected","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":420,"wires":[["4d5cd4d2.ca6dac","76f3ca2e.e6ba24","5740923f.43b4fc"]]},{"id":"4d5cd4d2.ca6dac","type":"debug","z":"e8d8c2f8.8dadb","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":570,"y":420,"wires":[]},{"id":"2c81f8e3.01f188","type":"function","z":"e8d8c2f8.8dadb","name":"","func":"var s1=msg.payload.s1\nvar s2=msg.payload.s2\nvar s3=msg.payload.s3\n\nmsg.payload.s4=s1*s2*s3;\nmsg.payload=msg.payload.s4;\nreturn msg;","outputs":1,"noerr":0,"x":550,"y":140,"wires":[["349d1898.a27438"]]},{"id":"76f3ca2e.e6ba24","type":"ui_text","z":"e8d8c2f8.8dadb","group":"2ad8ccc0.768104","order":6,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":490,"y":380,"wires":[]},{"id":"8910b3a7.3c47e","type":"ui_dropdown","z":"e8d8c2f8.8dadb","name":"","label":"PartsSAE","tooltip":"","place":"Select option 1","group":"2ad8ccc0.768104","order":1,"width":0,"height":0,"passthru":true,"options":[{"label":"P1","value":1,"type":"num"},{"label":"P2","value":2,"type":"num"},{"label":"P3","value":"3","type":"str"},{"label":"P4","value":"4","type":"str"},{"label":"P5","value":"5","type":"str"},{"label":"P6","value":"6","type":"str"},{"label":"P7","value":"7","type":"str"}],"payload":"","topic":"part1","x":100,"y":120,"wires":[["b0496f48.3bc85"]]},{"id":"8c75951b.1d92f8","type":"ui_dropdown","z":"e8d8c2f8.8dadb","name":"Frequency Rating","label":"Frequency Rating","tooltip":"","place":"Select option 2","group":"2ad8ccc0.768104","order":4,"width":0,"height":0,"passthru":true,"options":[{"label":"Very High Inevitable, 1in2","value":10,"type":"num"},{"label":"Very High Inevitable, 1in10","value":9,"type":"num"},{"label":"High Repeated Failure, 1in100","value":8,"type":"num"},{"label":"High Repeated Failure, 1in500","value":7,"type":"num"},{"label":"Moderate Occasional Failure, 1in1000","value":6,"type":"num"},{"label":"Moderate Occasional Failure, 1in5000","value":5,"type":"num"},{"label":"Low Relitavely Few Failures, 1in10,000","value":4,"type":"num"},{"label":"Low Relitavely Few Failures, 1in50,000","value":3,"type":"num"},{"label":"Remote Failure Unlikely, 1in100,000","value":2,"type":"num"},{"label":"Remote Failure Unlikely, 1in500,000","value":1,"type":"num"}],"payload":"","topic":"s3","x":130,"y":320,"wires":[["b0496f48.3bc85"]]},{"id":"5740923f.43b4fc","type":"ui_chart","z":"e8d8c2f8.8dadb","name":"","group":"2ad8ccc0.768104","order":5,"width":0,"height":0,"label":"chart","chartType":"bar","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"1000","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":true,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":480,"y":520,"wires":[[]]},{"id":"2ad8ccc0.768104","type":"ui_group","z":"","name":"Default","tab":"4786d8ab.2e82b8","disp":true,"width":11,"collapse":false},{"id":"4786d8ab.2e82b8","type":"ui_tab","z":"","name":"Home1","icon":"dashboard","disabled":false,"hidden":false}]

For future reference please read this post to see how to share your flow here.

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