
Dear Community,
i am working on a requirement in which i am exporting data into a text file using XmlPort object. i need some help regarding this. is it possible to add textelement to tableelement at runtime ? Please see screenshot. i want to add these textelement dynamically. Thanks
i am using Business Central 14.0.0
From my understanding the elements cannot be added dynamically but can be excluded dynamically instead.
You can use an OnBeforePassVariable trigger on each of your textelements to conditionally skip them like so:
textelement(No)
{
trigger OnBeforePassVariable()
begin
if *some condition here* then
currXMLport.Skip();
end;
end;
}
If you found a solution to conditionally add nodes I would love to know about it, since I am also working on a similar requirement.