# Grid variables in If component

**URL:** <https://matillioncommunity.discourse.group/t/grid-variables-in-if-component/1481>\
**Category:** Matillion ETL\
**Created:** [September 29, 2021, 8:03am UTC](https://matillioncommunity.discourse.group/t/grid-variables-in-if-component/1481 "2021-09-29T08:03:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeelamMacwan](https://avatars.discourse-cdn.com/v4/letter/n/8baadc/32.png) [@NeelamMacwan](https://matillioncommunity.discourse.group/u/NeelamMacwan)\
**Post date:** [September 29, 2021, 8:03am UTC](https://matillioncommunity.discourse.group/t/grid-variables-in-if-component/1481/1 "2021-09-29T08:03:10Z")

</div>

I want to compare Null value with grid variable and use If component to do so. I am not able to figure out how to use grid variable in If. Can anyone help here?

Also, please suggest any other way to compare null value with grid variable.

---

<div class="post-metadata">

**Author:** ![DataGuy](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@DataGuy](https://matillioncommunity.discourse.group/u/DataGuy)\
**Post date:** [September 29, 2021, 12:21pm UTC](https://matillioncommunity.discourse.group/t/grid-variables-in-if-component/1481/2 "2021-09-29T12:21:26Z")

</div>

Hi [@NeelamMacwan](https://matillioncommunity.discourse.group/u/NeelamMacwan)​ - I don't have an example of a grid variable, but there is a grid checkbox at the bottom of the If component which will allow you to use a grid variable:

 ![0694G00000GItWiQAL_0D74G000007jovKSAQ](https://us1.discourse-cdn.com/flex002/uploads/matillioncommunity/original/1X/965e27778ea3c5244bdffe6bec0096b1d679c8e2.png)

 ![0694G00000GItXgQAL_0D74G000007jovKSAQ](https://us1.discourse-cdn.com/flex002/uploads/matillioncommunity/original/1X/f9833f7dda47550df5c523295978ef24fff570f0.png)

---

<div class="post-metadata">

**Author:** ![NeelamMacwan](https://avatars.discourse-cdn.com/v4/letter/n/8baadc/32.png) [@NeelamMacwan](https://matillioncommunity.discourse.group/u/NeelamMacwan)\
**Post date:** [September 29, 2021, 12:53pm UTC](https://matillioncommunity.discourse.group/t/grid-variables-in-if-component/1481/3 "2021-09-29T12:53:35Z")

</div>

Hi [@DataGuy](https://matillioncommunity.discourse.group/u/DataGuy)​,

Thanks for your reply.

Yeah, I was trying the option but I could not figure out the Condition part.

I have a created a grid variable: row\_insert with three columns: Outcome, Log and ProcessedOn, I want to check if any record in these columns are NULL but don't know what to add in the highlighted fields in condition in Grid Variable in If component.

I tried but no success.

 ![0694G00000GIttmQAD_0D74G000007jowXSAQ](https://us1.discourse-cdn.com/flex002/uploads/matillioncommunity/original/1X/ff970e72e718576a3d8c2053cfad13cb78758e1e.jpeg)
