XML Port Table indent error for multiple tables.

MathanMathan Member Posts: 55
edited 2017-03-30 in NAV Three Tier
Hi everyone,

I am trying to import and export a CSV file to create a sales order. Here is a sample of it.

nayic4dssbsy.png

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

Best Answer

Answers

  • navdevelopernavdeveloper Member Posts: 23
    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.
  • MathanMathan Member Posts: 55
    Thank you, I checked it out. That's why I am wondering if there is any other way to do with csv.
  • MathanMathan Member Posts: 55
    Thank you HannesHolst, And most importantly for Imports? would it follow the same way?
  • HannesHolstHannesHolst Member Posts: 119
    @Mathan yes, importing a CSV follows the same restriction.

    Cheers
  • MathanMathan Member Posts: 55
    edited 2017-03-30
    @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?
  • HannesHolstHannesHolst Member Posts: 119
    I assume that your import-file does not consider the configuration of the TableSeperator:
    5xtckv101r7k.png
    <<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,
  • MathanMathan Member Posts: 55
    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.

    qpdri22c36vl.png

    Is there a way to get this right like continuous column wise?
  • HannesHolstHannesHolst Member Posts: 119
    Mathan wrote: »
    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,

  • MathanMathan Member Posts: 55
    Thank you.
  • Is it possible to have both header and line in a single XML object i tried but i am getting error..
Sign In or Register to comment.