Skip to main content
1-Visitor
July 16, 2018
Question

Getting only first row of record when I am using ReadCSVFiles service of CSVParserFuntions

  • July 16, 2018
  • 1 reply
  • 1895 views
Hi,

 

Please find attachments,

 

I am using ReadCSVFiles service of CSVParserFuntions for reading data from CSV files. CSV file contains 3 row of records actually (You can see in attached sample.csv file from sample.zip folder ).

 

but when I execute this service I get only 1 record as output but I want all records.I don't understand why It's happening.

 

Please check script code below and let me know what I am missing so that I can fix it and get csv data and load it into grid.

    1 reply

    5-Regular Member
    July 17, 2018

    Hi @bjadhav are you wrapping this service with another one? Because you need to loop through every row in the CSV to read it out, from the code snippet you have shared you are only going to get 1 row from the top and then the service stops. 

     

    You'd need something like for loop that runs as many times as there are rows in csv to read all the rows.