Getting only first row of record when I am using ReadCSVFiles service of CSVParserFuntions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Getting only first row of record when I am using ReadCSVFiles service of CSVParserFuntions
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.
- Tags:
- ptc forum
- ThingX BETA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
