# Variables:exists

**URL:** https://forum.flowable.org/t/variables-exists/9348
**Category:** Uncategorized
**Created:** [May 15, 2022, 9:03pm UTC](https://forum.flowable.org/t/variables-exists/9348 "2022-05-15T21:03:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mahima](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mahima](https://forum.flowable.org/u/Mahima)
#### Post date: [May 15, 2022, 9:03pm UTC](https://forum.flowable.org/t/variables-exists/9348/1 "2022-05-15T21:03:08Z")

</div>

I am trying to use variables:exists in my workflow in the source expression like so:

```auto
variables:exists(finalState)?${(finalState == "COMPLETED")}:true

```

But I am getting error  
FlowableException: Unknown property used in expression:variables:exists(finalState)?${(finalState == “COMPLETED”)}:true

---

<div class="post-metadata">

### Author: ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)
#### Post date: [May 16, 2022, 4:15pm UTC](https://forum.flowable.org/t/variables-exists/9348/2 "2022-05-16T16:15:49Z")

</div>

You need to wrap everything in ${} - you’re trying to write a ternary operator and that’s only possible within an expression.

---

<div class="post-metadata">

### Author: ![Mahima](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Mahima](https://forum.flowable.org/u/Mahima)
#### Post date: [May 17, 2022, 3:55pm UTC](https://forum.flowable.org/t/variables-exists/9348/3 "2022-05-17T15:55:19Z")

</div>

sure thanks. this worked
