XMLport, several FieldDelimiters?

Ryden
Member Posts: 24
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
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
www.nabsolutions.se
0
Comments
-
There's a property FIELDDELIMITER on a xmlport.
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 specialist0 -
Ok, so it can only handle one delimiter at a time. That's what I figured.
I put in a field in the Request Page to let the user choose the delimiter before the XMLport is run.--
www.nabsolutions.se0 -
First of all, I must apologize for some possible confusion, I'm talking about Field Separators, not Delimiters. My bad.
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.se0
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