Generally speaking the right way to dynamically set the length of an element list, Integer table, right?
Anyway, basically what happens is that NAV 6.00.29626 ignores the SETRANGE, SETFILTER commands set on the Integer table elements in the OnPreXMLElement - Export and OnAfterGetRecord - Export triggers and gets into an endless loop of trying to read the whole of the Integer table. If I statically set SourceTableView, that works, but cannot be changed dynamically. Even though a MESSAGE - GETFILTERS will show the filter I set in code, the actual number of repeititons is always the SourceTableView, not the code, and if I do not set SourceTableView, endless loop.
I am surely not the first one to try to export data based on the Integer table in V6, so is this really a bug? I
Business case (simplified): <item> <Description> sfdfsdfds <Description> <Description> fsdfds <Description> </EANCODE> </item> - if on the Item Card Description is filled out, create the Description element, otherwise do not create it, if Description 2 is filled out, create a second description element etc.
A workound could be making a temp table on some table with a matching layout and inserting record into it, but I would not prefer that...
0
Comments
I traded my sanity for a railgun
Of course there is someone else with the same problem, or a simular problem.
Yes my xmlport also hangs on port.export, but I found out it is caused by using the integer table twice!.
I tested it, with one time using the integer table it works fine, and it can be controlled form outside the port (setrange), with 2 integer tables it loops, even when the first integer table is controlled by sourcetableview.
Works fine if I use the sourcetableview property on both integer tables, but it is impossible to control the integer from outside the xmlport, if there are more then one tables used.
It is not that strange: how can the xmlport “know” from witch codeunit defined integer table it is controlled?
Benno
The solution is simple: Just add one or more functions to your xmlport to set the control value (glo-from,glo-to).
On the Export::OnPreXMLItem(), you can do a setrange(number, glo-from,glo-to).
Regard, Benno
No its not the same. Mine is about it is ignoring filters set right inside the XMLport.