# Is it possible to switch multiple values of the same branch?

**URL:** <https://discourse.nodered.org/t/is-it-possible-to-switch-multiple-values-of-the-same-branch/34614>\
**Category:** General\
**Created:** [21 October 2020 05:28 UTC](https://discourse.nodered.org/t/is-it-possible-to-switch-multiple-values-of-the-same-branch/34614 "2020-10-21T05:28:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Post date:** [21 October 2020 05:28 UTC](https://discourse.nodered.org/t/is-it-possible-to-switch-multiple-values-of-the-same-branch/34614/1 "2020-10-21T05:28:21Z")

</div>

Hi,  
Is it possible to switch **multiple values of the same branch** using the `switch` node like as below?

![switch-node-multi-value](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/c/9c178c87266781a02f67d5fdfbe6a25a38f9dba6.png)

If this is not possible, need to execute the javascript switch statement inside the `function` node?

Any idea will be great.  
Thanks!

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [21 October 2020 05:44 UTC](https://discourse.nodered.org/t/is-it-possible-to-switch-multiple-values-of-the-same-branch/34614/2 "2020-10-21T05:44:42Z")

</div>

Try using regex '^(a|b|c)$'

---

<div class="post-metadata">

**Author:** ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Post date:** [21 October 2020 05:53 UTC](https://discourse.nodered.org/t/is-it-possible-to-switch-multiple-values-of-the-same-branch/34614/3 "2020-10-21T05:53:40Z")

</div>

Thank you very much!^^

---

<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:** [4 November 2020 05:53 UTC](https://discourse.nodered.org/t/is-it-possible-to-switch-multiple-values-of-the-same-branch/34614/4 "2020-11-04T05:53:46Z")

</div>

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