xml import skipping a line

Kisu
Member Posts: 381
I'm having a problem with xml import with purchase lines.
I'd need to skip specific lines from xml file that has entryrowtype <> 0.
I know how to skip lines but this is a little problematic.
The 3rd party xml line has this entryrowtype under child tag of the rowtags so it gets the value after first line is init.
ex:
<invoice>
-> <header>
-> <row>
--> <entryrowtype>
Is there any better solution than making a temp table for the line data and fetch the lines that way?
I'd need to skip specific lines from xml file that has entryrowtype <> 0.
I know how to skip lines but this is a little problematic.
The 3rd party xml line has this entryrowtype under child tag of the rowtags so it gets the value after first line is init.
ex:
<invoice>
-> <header>
-> <row>
--> <entryrowtype>
Is there any better solution than making a temp table for the line data and fetch the lines that way?
K.S.
0
Answers
-
you can use xmldom and create a new xml from the original xmlfile and then send that to xmlport.0
-
Cheers for this again ara3n, I got it working already but good to have other solutions behind ear too.K.S.0
-
Hello All,
I have the same requirement.
I just want to skip the first Line of CSV file as it's a title of columns.
How can I do that? Please provide the suggestion.0 -
Is this a xmlport or dataport?0
-
I think that CSV -> dataport.. isn't it?
If so, please try to first set the AutoSave property to "No" on the dataport DataItem, then create a global bool called i.e. glFirstLineSkipped and finally insert this code in the OnAfterImportRecord:IF NOT glFirstLineSkipped THEN glFirstLineSkipped := TRUE ELSE IF NOT yourTable.INSERT(TRUE) THEN yourTable.MODIFY(TRUE);
-- Jup --0 -
you can use xmlport for csv as well.0
-
Really? Never tried..-- Jup --0
-
Thanks all for your help.
My problem has been resoved by the procedure as JUP has suggested.
Thanks again.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