Problem About Multiline Dataport

mratkya
Member Posts: 8
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?
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
-
I would do the following:
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 recordConfessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
You'll have to come up with a way to identify what is a header and what is a line. Whether that be counting the number of fields on the line, checking if the first field is a certain format, or something else.
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.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions