XMLPort: export fields from different tables indenta

TomigsTomigs Member Posts: 86
Hello,

I need to export a XML file with data from two tables but as if it was from one of them. The reason is that target system of the XML, the fields are in only one table.
For example I have the table 18 - "Customer" and an extra table 50000-"Customer extended properties" (1-1).

I want the resulting XML document not to show the name of the 50000 table. How could I do?
Thanks very much!

Example:
<CUSTOMER>
<NAME>Client 1</NAME>
<EXTRA_PROPERTIES>
<PROPERTY_1>Property1</PROPERTY_1>
</EXTRA_PROPERTIES>
</CUSTOMER>

I would like the tags of EXTRA_PROPERTIES to dissappear and the PROPERTY_1 tag to be at the same level as <NAME>, so it would look like:
<CUSTOMER>
<NAME>Client 1</NAME>
<PROPERTY_1>Property1</PROPERTY_1>
</EXTRA_PROPERTIES>
</CUSTOMER>

Is it Posible?

Answers

  • SogSog Member Posts: 1,023
    if it's a 1-1 relation, remove your intended record, and just fetch it in code.
    Just use a var in your exportfields and fill it in code.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • TomigsTomigs Member Posts: 86
    Thanks Sog, you are right: it should be done by code.

    For example in the OnAfterGetRecord of the Customer dataitem I can put something like:
    recCustomerProperties.get(cusotmer."No.");
    txtProperty1 := recCustomerProperties."Property 1";
    ...

    and add a variable PROPERTY 1, with the Data Source = txtProperty1.

    Thank you.
Sign In or Register to comment.