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" />
0
Comments
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").
John
Uwe <img border="0" title="" alt="" src="images/smiles/icon_wink.gif" />
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 ?