Options

Pass Records to XMLPort

Hi there,

I'm trying to pass Records as a Parameter to a XMLPort:
    RefundsXML.SetRecord(RefundsL);
    TempBlob.Blob.CREATEOUTSTREAM(OutStrL);
    RefundsXML.SETDESTINATION(OutStrL);
    RefundsXML.EXPORT;

RefundsL contains a few records (depending on the filter). With
RefundsXML.SetRecord(RefundsL);
I'm passing them over to a function in the XMLPort in which I assign the Parameter Variable into a Global Variable.
The problem is that I can only use the SourceType "Text" and not the Table/Fields for the nodes.

So here's my problem / question:
Whenever I run the code, only the very last record of the filter gets used and exported into a xml file. How can I make sure that the XMLPort properly repeats the nodes until every record is in the xml file?

I'm assigning the fields from the table manually to the variables / nodes in the parent node.

Thanks in advance!

Answers

  • Options
    lubostlubost Member Posts: 614
    Your code in SetRecord should look like:
    RefundsLXML.reset;
    RefundsLXML.setview(RefundsL.getview);
    if RefundsL.findfirst then ;
Sign In or Register to comment.