Hi, I need some help with Appeon PB R3 deploying as simple standalone application.
I have two DataStore objects of type (Tabular, external source)
I have a program that uses ImportFile() function to import 3,900 rows from a CSV file (UTF-8) into the first DataStore.
(also tested using visual datawindow control, all 3900 rows imported successfully, with data).
I would like to loop through every row in the first DataStore, check for Country field. If it matches I want to InsertRow() into a second DataStore, and SetItem() values on several columns in the second DataStore.
Finally to SaveAs() CSV the second datastore.
I know in the source CSV file there are more than 500 matches with data.
However every time I execute the code, I only get data populated up to 165 rows in the second CSV file, all the rest are blank.
Opening the CSV file in Excel, I only see 165 rows, but in Notepas, I see blank rows with commas.
Am I missing something ?
Code Sample:
//CSV filepath obtained using GetFileOpenName () function
ll_import = dstore_1.ImportFile (CSV!, is_pathname, 2)
IF ll_import > 0 THEN
dstore_2.Reset ()
DO
ll_row ++
IF dstore_1.GetItemString (ll_row, "country") = "ABC" THEN
dstore_2.InsertRow (0)
dstore_2.SetItem (ll_row, "origin_country", "ABC")
END IF
LOOP UNTIL ll_row = ll_import
END IF
Any advice greatly appreciated. Thanks
My bad, I overlooked the gap in between the rows in 2nd datastore.
Excellent news ... glad that you got it working!
Regards ... Chris