# Ignore Variable if Null on CSV

**URL:** <https://community.postman.com/t/ignore-variable-if-null-on-csv/5409>\
**Category:** Help Hub\
**Tags:** variables\
**Created:** [May 13, 2019, 11:22am UTC](https://community.postman.com/t/ignore-variable-if-null-on-csv/5409 "2019-05-13T11:22:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jitesh.sevani](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jitesh.sevani](https://community.postman.com/u/jitesh.sevani)\
**Post date:** [May 13, 2019, 11:22am UTC](https://community.postman.com/t/ignore-variable-if-null-on-csv/5409/1 "2019-05-13T11:22:01Z")

</div>

Hi, I’m new to Postman and setting up a basic Data driven Soap Request where it reads Address from a CSV file. In some cases I have {{DISTRICT}} and Null on the CSV but Postman is pulling in the Variable name when this record is left blank. Is there any way to pass this a Null if Null on the CSV?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [May 13, 2019, 11:49am UTC](https://community.postman.com/t/ignore-variable-if-null-on-csv/5409/2 "2019-05-13T11:49:53Z")

</div>

Hey @jitesh.sevani

Welcome to the community 👋

Are you to expand on this some more, please?

> [@jitesh.sevani](#):
>
> Postman is pulling in the Variable name when this record is left blank

Could you include a sample of the data file and any relevant images that would help people to understand the issue you’re facing.

---

<div class="post-metadata">

**Author:** ![jitesh.sevani](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jitesh.sevani](https://community.postman.com/u/jitesh.sevani)\
**Post date:** [May 13, 2019, 12:10pm UTC](https://community.postman.com/t/ignore-variable-if-null-on-csv/5409/3 "2019-05-13T12:10:52Z")

</div>

Hi, Sure.

Here is the XML:

```
                    <asm:BuildingNo>{{BUILDINGNO}}</asm:BuildingNo>
                    <asm:HouseName>{{HOUSENAME}}</asm:HouseName>
                    <asm:HouseNumber>{{HOUSENUMBER}}</asm:HouseNumber>
                    <asm:StreetLine1>{{STREETLINE1}}</asm:StreetLine1>
                    <asm:StreetLine2>{{STREETLINE2}}</asm:StreetLine2>
                    **<asm:District>{{DISTRICT}}</asm:District>**      
                    <asm:Town>{{TOWN}}</asm:Town>
                    <asm:Country>{{COUNTRY}}</asm:Country>
                    <asm:PostCd>{{POSTCD}}</asm:PostCd>

```

Here is the CSV file:

 ![Capture](https://us1.discourse-cdn.com/getpostman/original/3X/4/e/4ea28ce26a891cdab03ac61a086cbcbd45407a36.png)

What I end up with is this:

```
                    <asm:BuildingNo>1</asm:BuildingNo>
                    <asm:HouseName>MILLHOUSE</asm:HouseName>
                    <asm:HouseNumber>3</asm:HouseNumber>
                    <asm:StreetLine1>Sandy Road</asm:StreetLine1>
                    <asm:StreetLine2>Greenwich</asm:StreetLine2>
                    <asm:District>{{DISTRICT}}</asm:District>
                    <asm:Town>London</asm:Town>
                    <asm:Country>UK</asm:Country>
                    <asm:PostCd>SE19 8BT</asm:PostCd>

```

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [May 13, 2019, 1:29pm UTC](https://community.postman.com/t/ignore-variable-if-null-on-csv/5409/4 "2019-05-13T13:29:10Z")

</div>

It’s taking that `{{DISTRICT}}` value from the `POST` data and not the file, as it doesn’t _know_ what that value is, within the data file. You would probably be seeing the same for the `{{TOWN}}` placeholder on the 2nd iteration.

That being said, I’m not sure why that wouldn’t be coming through as `null` from the file.

Are you able to post an image of the `Preview`, from the Collection runner?

As a potential workaround, you could try and populate those blank values with `null` and see what happens?

> <https://stackoverflow.com/questions/8601212/excel-how-to-fill-all-selected-blank-cells-with-text/8603036#8603036>

I’m not sure about the implementation of the service, would it handle a `null` value?

---

<div class="post-metadata">

**Author:** ![jitesh.sevani](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jitesh.sevani](https://community.postman.com/u/jitesh.sevani)\
**Post date:** [May 13, 2019, 3:30pm UTC](https://community.postman.com/t/ignore-variable-if-null-on-csv/5409/5 "2019-05-13T15:30:13Z")

</div>

![image](https://us1.discourse-cdn.com/getpostman/original/3X/5/9/591405405d311fb31d4f2b65327fe95492811ad9.png)

I have put ‘null’ in the blank fields and all it does is pull the text though as ‘null’ and not blank. It’s strange as I would expect it to ignore any columns that are blank.
