# Velocity test for binary data

**URL:** <https://forum.servoy.com/t/velocity-test-for-binary-data/20485>\
**Category:** Questions\
**Created:** [April 26, 2021, 2:41pm UTC](https://forum.servoy.com/t/velocity-test-for-binary-data/20485 "2021-04-26T14:41:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wouter](https://avatars.discourse-cdn.com/v4/letter/w/e99b99/32.png) [@wouter](https://forum.servoy.com/u/wouter)\
**Post date:** [April 26, 2021, 2:41pm UTC](https://forum.servoy.com/t/velocity-test-for-binary-data/20485/1 "2021-04-26T14:41:54Z")

</div>

Hi,

In a Velocity template I need to test for content in a binary column. The column is part of the dataset and all I need is to know if it contains data. With other datatypes I would simply test this by calling the variale

e.d.

#if($column)  
  
#end

but for the binary column I can nog get this to work.

I have tried

#if($binary\_column)  
#if($binary\_column != ‘’)  
#if($binary\_column.length \>0)

but none seem to have an effect.

How do I test for this?

Wouter.

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [April 26, 2021, 5:10pm UTC](https://forum.servoy.com/t/velocity-test-for-binary-data/20485/2 "2021-04-26T17:10:11Z")

</div>

Try using:

```auto
$null.isNull($yourVariable)

```

or

```auto
$null.isNotNull($yourVariable)

```

---

<div class="post-metadata">

**Author:** ![wouter](https://avatars.discourse-cdn.com/v4/letter/w/e99b99/32.png) [@wouter](https://forum.servoy.com/u/wouter)\
**Post date:** [April 28, 2021, 9:39am UTC](https://forum.servoy.com/t/velocity-test-for-binary-data/20485/3 "2021-04-28T09:39:46Z")

</div>

Hi Patrick,

That did the trick. Thanks!

Wouter.
