import text longer than 250 chars to comments

uulbrich
Member Posts: 7
We need to import text from our old CRM system to Navision comment fields wicht are limited to 80 chars. The idea is to split the text to multiple lines but how to deal with a 250+ char string in a dataport. Any ideas?
Uwe <img border="0" title="" alt="" src="images/smiles/icon_confused.gif" />
Uwe <img border="0" title="" alt="" src="images/smiles/icon_confused.gif" />
0
Comments
-
Solution 1: Use Attain (1024 characters allowed)
Solution 2: If you can isolate the text to import, you could create a codeunit to read from the file(s) step by step. Using a variable of type Binary, you can read chunks of up to 2000 bytes from the file (with "importfile.READ(bin_var)" method). From this binary variable, you can parse out the text character by character ( with LineText := LineText + FORMAT(bin_var[index]) method. This also allows you to do some formatting checks, like "if bin_var[index] = 13 then New_line").
John0 -
Thanks, John. We'll try. BTW, we have Attain here but it seems there are a few too new things in it for our consultants.
Uwe <img border="0" title="" alt="" src="images/smiles/icon_wink.gif" />0 -
We also use attain (3.01.B) and I tried to import tab delimited file with one field cca 700 chars long.
I defined a Text variable of 1024 length and set it as dataport field.
But when it comes to import Attain truncates this into 254 chars and there's nothing I can do about it.
The other soultion I'm trying to do is use excel to split this long field into more fields of 250 cahrs and then import it.
Anybody knows more ?®obi0 -
Try replacing the blancs in your ASCII-file with a certain character (eg. #). Then, after importing in Navision, you can change that character back to space.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)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