I've a problem with dataports in Navision.
The data in Text format is attached. My customer uses 5.1. The data in the text is coming header and line format. but there is no 2 texts. we have only one text and two tables in it. We can not change the text format it is not about us.
HEADER .......
LINE........
LINE.......
HEADER.....
LINE......
HEADER......
LINE........
LINE........
BS276610 SF.276610 Nuray Ylmaz 28403991 Nuray Ylmaz O121420091214 83.97 15.11H 99.08 0.00 0.00T 0.00 0.00T 0.00 0.00T 0.00 0.00T 0.00 0.0 E 20091214
HS276610 ISCILIK %18 KDV'L˜ SERV˜S ˜€˜L˜¦˜ 18.0 0.00 SA 1.0000 31.50000 31.50
HS276610 PARCA2 %18 K.D.V.'li Par‡alar 18.0 0.00 AD 12.0000 4.37000 52.47
BS276612 SF.276612 Fleet Corp Operasyonel TaŸt Kiralama V6636001 Fleet Corp Operasyonel TaO121420091214 221.91 39.94H 261.85 0.00 0.00T 0.00 0.00T 0.00 0.00T 0.00 0.00T 0.00 0.0 E 20091214
HS276612 ISCILIK %18 KDV'L˜ SERV˜S ˜€˜L˜¦˜ 18.0 0.00 SA 1.3000 36.66000 47.66
HS276612 PARCA2 %18 K.D.V.'li Par‡alar 18.0 0.00 AD 9.0000 19.36000 174.25
BS276643 SF.276643 ™nder ™nce 22824031 ™nder ™nce P121420091214 1.60 0.29H 1.89 0.00 0.00T 0.00 0.00T 0.00 0.00T 0.00 0.00T 0.00 0.0 E 20091214
I can solve the problem just like that. I'm cuting the data in the text to Excel, sorting the data, and pasting the text again. And creat a blank line between header and line. And I can take it to the navision.
But my customer doesn't accept this like that. They don't want any change in text . So I Can't import the data in to the navision.
Dou have any idea about importing the data with a format like that?
0
Comments
1. Use the integer as your data item.
2. Load all the fields into text variables
3. Write a case statement based on how you identify what's a header record and what's a line record
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Then follow Alex's suggestion about using the Integer data item and the text variables. I prefer to use a text array in cases like this. Then you can use EVALUATE or directly load your values into the correct fields.
Don't forget to turn off AutoInsert and AutoUpdate.
My Blog - nav.education