# IF/Else statement not working

**URL:** <https://community.make.com/t/if-else-statement-not-working/26653>\
**Category:** Questions\
**Tags:** functions\
**Created:** [February 7, 2024, 6:37am UTC](https://community.make.com/t/if-else-statement-not-working/26653 "2024-02-07T06:37:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack\_Randall](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@Jack\_Randall](https://community.make.com/u/Jack_Randall)\
**Post date:** [February 7, 2024, 6:37am UTC](https://community.make.com/t/if-else-statement-not-working/26653/1 "2024-02-07T06:37:24Z")

</div>

Hi I’m trying to use an If/Else statement to choose what model is used for my ElevenLabs API call.

Step 1: ID is returned from script module

 ![Screen Shot 2024-02-06 at 10.30.59 PM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/6/6683e959c2e444a74b2cd4434ae10ddb0523fe87.png)

Step 2: result from Step 1 is added to next module, http module, and if/else is within one of the fields to choose between ElevenLabs models based on the result of Step 1.

 ![Screen Shot 2024-02-06 at 10.31.12 PM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/3/1/31d83a469913b1935dbdafc9c25cd02eb54f0f6e.png)

Here’s the result of step 2:

 ![Screen Shot 2024-02-06 at 10.31.41 PM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/8/6857233297b0f78b1a237c7ff0454a76f67dbb3d.png)

As you can see, the result from step 1 doesn’t match any of the values in the IF statement, but it didn’t use the else value for the model\_id. I’m not sure what I’m doing wrong, this is my first time using the If/Else feature.

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [February 7, 2024, 6:48am UTC](https://community.make.com/t/if-else-statement-not-working/26653/3 "2024-02-07T06:48:28Z")

</div>

You can’t chain `or` this way.

You need to repeat the {{20.result.data = }} for each “`or`”

```plaintext
if
  ID = "value1" OR
  ID = "value2" OR
  ID = "value3" OR
  ID = "value4" OR
  ID = "value5"

then
  do_something

else
  do_something_else

```

---

<div class="post-metadata">

**Author:** ![Jack\_Randall](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@Jack\_Randall](https://community.make.com/u/Jack_Randall)\
**Post date:** [February 7, 2024, 6:52am UTC](https://community.make.com/t/if-else-statement-not-working/26653/4 "2024-02-07T06:52:19Z")

</div>

> [@samliew](#):
>
> You can’t chain `or` this way.
> 
> You need to repeat the {{20.result.data = }} for each “`or`”

That fixed it. Thank you 😅

---

<div class="post-metadata">

**Author:** ![ManishMandot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/manishmandot/32/25887_2.png) [@ManishMandot](https://community.make.com/u/ManishMandot)\
**Post date:** [February 7, 2024, 7:15am UTC](https://community.make.com/t/if-else-statement-not-working/26653/5 "2024-02-07T07:15:20Z")

</div>

Hello @Jack_Randall

We are glad that your problem has been resolved by @samliew .Here is a screenshot of the solution  
 ![Screenshot 2024-02-07 123236](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/a/c/ac7dc1933996fd9720bd2daa3d314f49ad0915e3.png)

If you need any further assistance, feel free to contact us

GROWWSTACKS  
[Visit us](https://www.growwstacks.com/)

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [February 7, 2024, 9:08am UTC](https://community.make.com/t/if-else-statement-not-working/26653/6 "2024-02-07T09:08:13Z")

</div>

No problem, glad I could help!

1. If you have a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The [Make Community guidelines](https://community.make.com/t/make-community-the-ultimate-topic/11682) encourages users to try to **mark helpful replies as solutions** to help keep the Community organized.

This marks the topic as solved, so that:

others can _save time_ when catching up with the latest activity here, and

- allows others to _quickly jump to the solution_ if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:  
 ![Screenshot_2023-10-04_161049](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/5/d/5d9b26fbef0fd7385a34084f61cd5b9165786f42.png)

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [February 21, 2024, 7:02am UTC](https://community.make.com/t/if-else-statement-not-working/26653/7 "2024-02-21T07:02:00Z")

</div>


