# doIfEqual(OrElse) seem not to work

**URL:** https://community.gatling.io/t/doifequal-orelse-seem-not-to-work/3331
**Category:** Gatling (Open-Source)
**Created:** [October 20, 2016, 1:43pm UTC](https://community.gatling.io/t/doifequal-orelse-seem-not-to-work/3331 "2016-10-20T13:43:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Christophe\_Bordieu](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@Christophe\_Bordieu](https://community.gatling.io/u/Christophe_Bordieu)
#### Post date: [October 20, 2016, 1:43pm UTC](https://community.gatling.io/t/doifequal-orelse-seem-not-to-work/3331/1 "2016-10-20T13:43:42Z")

</div>

Hello

I am new to Gatling/Scala.  
I am trying to execute requests depending on status of previous one. I want to use doIfEquals. It fails.  
To debug I have tried using doIfEqualsOrElse. I have printed in console the value of status: it is correct: 201 after issue creation.  
But my condition is never true whereas it should be ! I don’ t understand why.  
I am using 2.2.2.

Any help appreciated.

---

<div class="post-metadata">

### Author: ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)
#### Post date: [October 20, 2016, 1:52pm UTC](https://community.gatling.io/t/doifequal-orelse-seem-not-to-work/3331/2 "2016-10-20T13:52:47Z")

</div>

.doIfEqualsOrElse("${createStatus}", **“201”** ){

status is an Int, not a String.

---

<div class="post-metadata">

### Author: ![Christophe\_Bordieu](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@Christophe\_Bordieu](https://community.gatling.io/u/Christophe_Bordieu)
#### Post date: [October 20, 2016, 2:08pm UTC](https://community.gatling.io/t/doifequal-orelse-seem-not-to-work/3331/3 "2016-10-20T14:08:35Z")

</div>

OK. This is what I was expected.  
I was going to ask you to help more when I thought I could just remove " characters.  
It works now.  
Sorry for disturbance… And thank you very much for quick feedback
