# Possible bug with CSV Iterator - blank fields getting value from previous line of data

**URL:** https://www.finalbuilder.com/forums/t/possible-bug-with-csv-iterator-blank-fields-getting-value-from-previous-line-of-data/4696
**Category:** Bugs
**Created:** [August 26, 2015, 5:20am UTC](https://www.finalbuilder.com/forums/t/possible-bug-with-csv-iterator-blank-fields-getting-value-from-previous-line-of-data/4696 "2015-08-26T05:20:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jonathanmeltzer](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jonathanmeltzer](https://www.finalbuilder.com/forums/u/jonathanmeltzer)
#### Post date: [August 26, 2015, 5:20am UTC](https://www.finalbuilder.com/forums/t/possible-bug-with-csv-iterator-blank-fields-getting-value-from-previous-line-of-data/4696/1 "2015-08-26T05:20:09Z")

</div>

Greetings! &nbsp;I have a CSV file that I am processing with the CSV iterator. &nbsp;When there is data in a field on a line, but no data in the field on the next line, the next line’s variable definition is getting the data from the first line. &nbsp;An example (not the exact logic, but this should illustrate the problem):  
  
The CSV iterator runs against a file that has the following two lines of data, assigning values to the variables %name%,%age%,%subtype%,%type%:  
BOB,4,“Toddler”,“Child"  
KEN,25,”","Adult"  
  
After the first line is processed, %name% is Bob, %age% is 4, %subtype% is Toddler, %type% is Child  
After the second line is processed, %name% is Ken, %age% is 25, **%subtype% is Toddler** , %type% is Adult  
  
Because the second line has no data for the third field, it is somehow keeping the data from the previous line. &nbsp;As a result, further downstream when I insert data into our database, the incorrect data is getting in. &nbsp;Is there something I am missing? &nbsp;Do you need more information?  
  
Using Automise 4.0.0.631.  
  
Thanks,  
  
Jonathan

---

<div class="post-metadata">

### Author: ![jonathanmeltzer](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jonathanmeltzer](https://www.finalbuilder.com/forums/u/jonathanmeltzer)
#### Post date: [August 26, 2015, 6:23am UTC](https://www.finalbuilder.com/forums/t/possible-bug-with-csv-iterator-blank-fields-getting-value-from-previous-line-of-data/4696/2 "2015-08-26T06:23:27Z")

</div>

I did a test where I removed quote marks from empty fields, e.g. changing the second line in my first post to:   
  
 KEN,25,“Adult”   
  
 This did not change the behavior, though. The bug still occurred.

---

<div class="post-metadata">

### Author: ![jonathanmeltzer](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jonathanmeltzer](https://www.finalbuilder.com/forums/u/jonathanmeltzer)
#### Post date: [August 26, 2015, 6:52am UTC](https://www.finalbuilder.com/forums/t/possible-bug-with-csv-iterator-blank-fields-getting-value-from-previous-line-of-data/4696/3 "2015-08-26T06:52:30Z")

</div>

Please cancel this - the issue was something completely different. I have fixed it, and it has nothing to do with the CSV Iterator. My apologies.
