XML Port Table indent error for multiple tables.

Mathan
Member Posts: 55
Hi everyone,
I am trying to import and export a CSV file to create a sales order. Here is a sample of it.

In the above image, the Format property is set to XML. Now for that indentation, there is no error. When I change the format property to variable Text. I get that Table indentation error.
"An element with source type Table cannot have Table element children."
Since I am exporting from multiple tables sales header and sales line. The indentation should not change right? I tried changing the indentation but it did not work the way I want, because the sales lines showed up at the end after all the sales header fields. Could someone help me out on what should I do?
EDIT: I checked out some forums and it seems like nav doesn't allow this combination. There were lots of suggestion to use an Integer table. Could someone throw me an example on how to use integer table or is there any other way?
Thanks in advance,
Mathan
I am trying to import and export a CSV file to create a sales order. Here is a sample of it.

In the above image, the Format property is set to XML. Now for that indentation, there is no error. When I change the format property to variable Text. I get that Table indentation error.
"An element with source type Table cannot have Table element children."
Since I am exporting from multiple tables sales header and sales line. The indentation should not change right? I tried changing the indentation but it did not work the way I want, because the sales lines showed up at the end after all the sales header fields. Could someone help me out on what should I do?
EDIT: I checked out some forums and it seems like nav doesn't allow this combination. There were lots of suggestion to use an Integer table. Could someone throw me an example on how to use integer table or is there any other way?
Thanks in advance,
Mathan
0
Best Answer
-
CSV (comma separated values) is a flat format which does not support an indented structure.
In your case - to make things easier - I would create two XMLports.
The first exports the Header-data and the seconds export the line-data.
If you want to keep all in one, you have to go this way:
My blog - https://www.HannesHolst.com/5
Answers
-
Please have a look at http://forum.mibuso.com/discussion/65732/xmlport-with-child-tables. This will work with XML format, but not with CSV.0
-
Thank you, I checked it out. That's why I am wondering if there is any other way to do with csv.0
-
CSV (comma separated values) is a flat format which does not support an indented structure.
In your case - to make things easier - I would create two XMLports.
The first exports the Header-data and the seconds export the line-data.
If you want to keep all in one, you have to go this way:
My blog - https://www.HannesHolst.com/5 -
Thank you HannesHolst, And most importantly for Imports? would it follow the same way?0
-
My blog - https://www.HannesHolst.com/0
-
@HannesHolst I have tried it for imports, Only the header table gets filled with the imported values, The Line table is left blank. May i know what should be done so that the Line table should also get imported with its values?0
-
I assume that your import-file does not consider the configuration of the TableSeperator:
<<NewLine><NewLine>>
This is the standard selected by default. Follow this structure and the import will work.
An easy way for understanding is to export data first. Then analysing the file and create an import-file based upon it.
Cheers,My blog - https://www.HannesHolst.com/0 -
Yes, thank you. The tables and the fields were separated by a column. I tried exporting it. And the lines appeared after a blank line and all the header table values.
Is there a way to get this right like continuous column wise?0 -
Is there a way to get this right like continuous column wise?
What problem do you see with the columns?
As I wrote before, to make things easier, just create two XMLports.
Cheers,
My blog - https://www.HannesHolst.com/0 -
Thank you.0
-
Is it possible to have both header and line in a single XML object i tried but i am getting error..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