RecRef in XMLport

NS5
Member Posts: 2
Hey,
a few month ago i started coding with NAV 2015.
The last 8 years i just worked with NAV 4.50 to 2009 R2 CC, so some stuff is a little bit new for me
So i have a little basic question about XMLports:
Is it possible to export table data i dont define in the XMLport designer previously ?
For example, i have the following table with one field (TableID):
TableID
470
471
18
Now i want that the XMLport run through that table and export all the data from table 470, table 471 and so on.
Can i realize that with RecRefs or something like that ?
Big thanks in advance.
NS5
a few month ago i started coding with NAV 2015.
The last 8 years i just worked with NAV 4.50 to 2009 R2 CC, so some stuff is a little bit new for me

So i have a little basic question about XMLports:
Is it possible to export table data i dont define in the XMLport designer previously ?
For example, i have the following table with one field (TableID):
TableID
470
471
18
Now i want that the XMLport run through that table and export all the data from table 470, table 471 and so on.
Can i realize that with RecRefs or something like that ?
Big thanks in advance.
NS5
0
Comments
-
Probably not the way you are thinking about it. You have to have a value in either a field or a variable and that field or variable has to be explicitly stated in the XMLport designer. The only way I can see this working with RecRefs is to write code to concatenate a text variable (you can have unlimited length text now).0
-
All depends on how you will create the XMLPort. You can base it over Integer table and set the values of your elements through code. It is same like when you will want o do same in dataport in older versions...
Or you can use DotNet interop and do the same through XMLDocument class... as you will do it when using C# or something else..0 -
At first, thanks for your answers
Little note: I wrote a codeunit with an MSXML automation to ex - & import data from NAV.
To check different ways i just want to try if i can realize this with an XMLport.All depends on how you will create the XMLPort. You can base it over Integer table and set the values of your elements through code.
I dont know if i understand this correctly. How do you trigger the XMLport to export the values after i ran over the Integer table ? I have an Integer table with an entry '18'. Then i fill an RecRef with the values from this table. In the last step i want to export this data but neither i cant define the RecRef as an XMLport Data Source, nor i can use any function or trigger to do so. I think i dont understand this correctly, sorry, so do you have an example for the procedure you have in your mind ?0 -
Create the Element with source type Table, data source Integer. Than create nodes of type text as you wish for the data. In OnAfterGetRecord you can prepare the data for each record you want to export and in OnBeforePassVariable you can assign the value to the node. You can combine this as you wish into more dataitems (e.g. to loop through tables and records and their fields...). It is nearly same like using Integer in report for outputing the temp table...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions