# If statement help

**URL:** https://forum.kirupa.com/t/if-statement-help/234480
**Category:** Uncategorized
**Created:** [August 2, 2007, 3:39pm UTC](https://forum.kirupa.com/t/if-statement-help/234480 "2007-08-02T15:39:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ivanwright](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ivanwright/32/119_2.png) [@ivanwright](https://forum.kirupa.com/u/ivanwright)
#### Post date: [August 2, 2007, 3:39pm UTC](https://forum.kirupa.com/t/if-statement-help/234480/1 "2007-08-02T15:39:39Z")

</div>

can anyone tell me why this if statement doesn’t work?

i have a comboBox that i need to associate different email addresses with the different selections (the “selections” are the labels of the comboBox - not the data… the data fields for the comboBox are blank). right now, as written it returns “email2” no matter which i pick.

what am i missing?

```auto

if (comboBoxName.getValue() == (("selection1") || ("selection2") || ("selection3") || ("selection4") || ("selection5") || ("selection6") || ("selection7") || ("selection8"))) {
		var comboSelectionEmail = "email1";
	} else {
		var comboSelectionEmail = "email2";
	}

```

also, is there an easier way to do this than by using the if statement?

thanks!
