Hi,
I have the following csv file
40014065156
Date,Detail,Amount
04/11/2008,XXXXXXXXX,75.00
05/11/2008,XXXXXXXXX,65.00
06/11/2008,XXXXXXXXX,85.00
07/11/2008,XXXXXXXXX,95.00
08/11/2008,XXXXXXXXX,100.00
09/11/2008,XXXXXXXXX,200.00
10/11/2008,XXXXXXXXX,300.00
The dataport has already been created to enter the date, details and amount into their corresponding columns in the table and it works fine. The problem is with the account number i.e the first line (40014065156). i want to store it in a variable instead. How can I do so and in which trigger?
Regards,
Answers
OnAfterImportRecord:
IF AccountNo = '' THEN BEGIN //Is not filled in
AccountNo := ColumnFromFile;
CurrDataport.SKIP; //So you don't continue processing that line
END;
That should get you started. Other changes may be necessary. Ideally they would be in the file as separate data items with a blank line in between (or whatever the DataItemSeparator property is set to).
My Blog - nav.education
Thanks for your reply but what is ColumnFromFile? Is it a variable or is it build-in in navision because it is giving me the error that i have specified an unknown variable
Regards,
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.