# Muliply values from Dropdown menu

**URL:** <https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653>\
**Category:** Dashboard\
**Created:** [11 April 2020 17:18 UTC](https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653 "2020-04-11T17:18:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![moeedejazkhan](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@moeedejazkhan](https://discourse.nodered.org/u/moeedejazkhan)\
**Post date:** [11 April 2020 17:18 UTC](https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653/1 "2020-04-11T17:18:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [11 April 2020 17:30 UTC](https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653/2 "2020-04-11T17:30:12Z")

</div>

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 😊

Stay healthy, Johannes

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 April 2020 20:39 UTC](https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653/3 "2020-04-11T20:39:29Z")

</div>

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](https://cookbook.nodered.org/basic/join-streams). Import the example there and try it to see how it works, then you should be able to adapt it to your needs.

---

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [11 April 2020 20:42 UTC](https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653/4 "2020-04-11T20:42:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 April 2020 20:49 UTC](https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653/5 "2020-04-11T20:49:18Z")

</div>

> [@JGKK](#):
>
> you can use the ui-form node

Does the Form node have a dropdown box?

---

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [11 April 2020 20:57 UTC](https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653/6 "2020-04-11T20:57:59Z")

</div>

No, good point @Colin👍 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.

---

<div class="post-metadata">

**Author:** ![moeedejazkhan](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@moeedejazkhan](https://discourse.nodered.org/u/moeedejazkhan)\
**Post date:** [12 April 2020 00:03 UTC](https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653/7 "2020-04-12T00:03:52Z")

</div>

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

flow link:

```auto
[{"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}]

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [12 April 2020 07:33 UTC](https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653/8 "2020-04-12T07:33:06Z")

</div>

For future reference please read [this post](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506) to see how to share your flow here.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 May 2020 07:33 UTC](https://discourse.nodered.org/t/muliply-values-from-dropdown-menu/24653/9 "2020-05-12T07:33:14Z")

</div>

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