How would one skip a line on a data port import?
I have a tab deliminated file that includes a field that I want to use as an indicator to skip that line if it is 'Y'. I've stored that indicator to a global variable. I know I have to use an IF statement, but when I use the Record.NEXT function it doesn't skip the line completely.
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
http://www.BiloBeauty.com
http://www.autismspeaks.org
I try using this code below, but it's doesn't work.
IF CurrFile.POS = 1 THEN
CurrDataport.SKIP;
Any one can help me?
on PreDataItem insert this code: CharVar - Char type variable
Have a good day.
Br,
Igor Beeone
Thanks it's work...
Can you explain this code.
Thanks.
OnPreDataItem trigger file is opened and ready to be read. Cursor of reading is in the beginning of file, so we just read characters from a file until end of line is found (The '10' denotes end-of-line).
So after this code, reading cursor is positioned on a second line, where dataport goes forward:)
That's all magic.
Br,
Igor Beeone
Import dataport and skipping the header line
By Kriki in Tips N Tricks
http://www.mibuso.com/forum/viewtopic.php?t=10564
http://www.BiloBeauty.com
http://www.autismspeaks.org