# Join with different number of inputs

**URL:** <https://discourse.nodered.org/t/join-with-different-number-of-inputs/73775>\
**Category:** General\
**Created:** [16 January 2023 19:09 UTC](https://discourse.nodered.org/t/join-with-different-number-of-inputs/73775 "2023-01-16T19:09:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)\
**Post date:** [16 January 2023 19:09 UTC](https://discourse.nodered.org/t/join-with-different-number-of-inputs/73775/1 "2023-01-16T19:09:00Z")

</div>

Hello,

I would like to implement correct nodered way of joining messages. There are 4 droplists and elements can be selected from all 4 independent from each other. After selection is finished, button in dashboard is pressed.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/4/a4465d3585089d8932a04022f9f44fc03bd28847.png)

I usually join with `flow.set()` but decided it is a time to learn something new 🙂

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 January 2023 19:27 UTC](https://discourse.nodered.org/t/join-with-different-number-of-inputs/73775/2 "2023-01-16T19:27:07Z")

</div>

> [@KarolisL](#):
>
> it is a time to learn something new

Ok, then I'm assigning you some homework.

Did you read the 'Help' tab for the `Join` node? That is a good place to start 😀

Then you can go to the hamburger tab and select import and take a look at the examples for the `Join` node

 ![Screenshot 2023-01-16 at 2.25.26 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/7929025755d3b06c07091604d67c765d62ace640.png)

If you have questions then, ask away!

---

<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:** [16 January 2023 19:37 UTC](https://discourse.nodered.org/t/join-with-different-number-of-inputs/73775/3 "2023-01-16T19:37:31Z")

</div>

Feed the button into the Join node too, with the node in key/value mode, and the inputs each having different topics. Set And Every Subsequent Message in the node so that it passes on a message for every input. Then add a Switch node after the join node which only passes messages with the submit button topic. So every time you press the button you will get a message with all the values.

---

<div class="post-metadata">

**Author:** ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)\
**Post date:** [16 January 2023 20:59 UTC](https://discourse.nodered.org/t/join-with-different-number-of-inputs/73775/4 "2023-01-16T20:59:44Z")

</div>

Dumb me, forgot to insert value to count  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/8/e842068d9232eec156ca02c7ac5fa9151f1584ae.png)

Thanks for help

---

<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:** [30 January 2023 21:00 UTC](https://discourse.nodered.org/t/join-with-different-number-of-inputs/73775/5 "2023-01-30T21:00:02Z")

</div>

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