Customised exporting using XMLPort

MaintexMaintex Member Posts: 4
edited 2008-06-12 in Navision e-Commerce
Hi,

I have an XMLPort that I currently populate with values in code that I then export to a PHP page. The PHP page interpretes these values and returns data from a MySQL database based on the values exported to it.

Up until now this has been fine, however, I now want to output the fields I want to have returned to me from the PHP page. I can easily do this by setting an XMLPort text variable to a string containing the fields that I want and seperated by a common delimter. However, what would be nice is to be able to have the following:
<fields>
   <field>
      a
   </field>
   <field>
      b
   </field>
   <field>
      etc...
   </field>
</fields>

But I don't know how to do this without creating a table containing the fieldnames and exporting that table using the XMLPort. Is there a way in OnInit/OnPre/OnPost XMLPort to create this array of fields in code so that it will be output like the XML shown above?

Thanks in advance,

Maintex

Comments

  • kinekine Member Posts: 12,562
    May be you can try to use Integer table as base and for each node under this Table node use text variable you will fill with next value in the OnBeforePassVariable or OnAfterAssignVariable for import...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.