Ignore Variable if Null on CSV

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.

Hey @jitesh.sevani

Welcome to the community :wave:

Are you to expand on this some more, please?

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

Hi, Sure.

Here is the XML:


Here is the CSV file:

What I end up with is this:

                    <asm:StreetLine1>Sandy Road</asm:StreetLine1>
                    <asm:PostCd>SE19 8BT</asm:PostCd>

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?

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

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.