# How can we write expression for checking if single control value is null or not

**URL:** <https://community.tulip.co/t/how-can-we-write-expression-for-checking-if-single-control-value-is-null-or-not/2539>\
**Category:** Support, Troubleshooting, & Help\
**Created:** [April 22, 2021, 9:43am UTC](https://community.tulip.co/t/how-can-we-write-expression-for-checking-if-single-control-value-is-null-or-not/2539 "2021-04-22T09:43:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![suvarnap](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@suvarnap](https://community.tulip.co/u/suvarnap)\
**Post date:** [April 22, 2021, 9:43am UTC](https://community.tulip.co/t/how-can-we-write-expression-for-checking-if-single-control-value-is-null-or-not/2539/1 "2021-04-22T09:43:54Z")

</div>

how can we write expression for checking if single control value is null or not, if it is not null it should return some value and if it is null then it should return some different value.  
And I want to write this in some expression.

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [April 22, 2021, 12:34pm UTC](https://community.tulip.co/t/how-can-we-write-expression-for-checking-if-single-control-value-is-null-or-not/2539/2 "2021-04-22T12:34:57Z")

</div>

hello @suvarnap, great question!!

where is the control value coming from (barcode scanner, Input Widget, etc.)?? once you store it in a Variable, you can use logic this to do what you’re describing:

 ![Screen Shot](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/b/b296c02135267437a53d1567862631fdb8b8f240.jpeg)  
 ![Screen Shot 3](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/4/4294e42b77490b2c670b7066453be4adb61f3c36.jpeg)

let me know if you have further questions!!
