Hi!
I'm Writing a XMLport that imports a CSV file.
Mostly this file comes separated with TAB but occationally it comes separated by semicolon.
Is there a way to have the XMLport handle muliple field delimiters? I have tried but it seems it only allows one delimiter
--
www.nabsolutions.se
0
Comments
From help: You can set the field delimiter in C/AL code so that the XMLport can import and export records with different delimiters. For example, if your XMLport must import from a file or stream where one record uses commas and another uses an empty string, you can change the field delimiter property at run time.
Tino Ruijs
Microsoft Dynamics NAV specialist
I put in a field in the Request Page to let the user choose the delimiter before the XMLport is run.
www.nabsolutions.se
Next problem concerns Globals as input to the FieldSeparator property
I put a textfield on the request page to set the separator, initial value is <TAB>, SourceExpression for this field is set to gFieldSeparator
In XMLport properties I set SourceExpression fpr FieldSeparator to gFieldSeparator as well.
This works lika charm in my development environment, I can separate by tab, by semicolon, by comma etc. but when we delivered the code to the customer it just wouldn't work, the lines where never chopped up at all no matter what we tried. Debug shows that gFieldSeparator does indeed change it's value but it has no effect.
I had to revert to a hard coded <TAB> in the properties.
It's a NAV 2013, anybody recognize this behavior?
www.nabsolutions.se