Skip file in XML-import

Elessar
Member Posts: 28
Hey!
I have a XML-port which imports the XML-files from a folder. Now I want to skip the current file, if it has the character "(" in the field "name2". I know how to search for the character, but I don't know how to skip the current XML-file and switch to the next one in the folder. Can I use something like currentxmlport.skip? Is it also possible to move the file to another directory or to rename it? I'm new to dynamics nav and searched the forum but I'm not sure about these things so I hope you can help me.
Best regards!
I have a XML-port which imports the XML-files from a folder. Now I want to skip the current file, if it has the character "(" in the field "name2". I know how to search for the character, but I don't know how to skip the current XML-file and switch to the next one in the folder. Can I use something like currentxmlport.skip? Is it also possible to move the file to another directory or to rename it? I'm new to dynamics nav and searched the forum but I'm not sure about these things so I hope you can help me.
Best regards!
0
Comments
-
when each file is a single proces, i think you can use currXMLport.QUIT, to stop the proces, but i think you find the records from this currfile before this quit in the database.
search for the differences between skip, break and quit in the cside reference guide0 -
so you have to find a way to deal with that0
-
Hey,
yes, each file is a single process, because it has only one item in it. I search a bit about the three functions (quit, break, skip), but another question is, if it is also possible to move the file, when I skip it?
Best regards!0 -
Yes you can move it after it has unsuccesfully been extracted.
Some solutions I've developed moved them to either a finished or a problem folder.0 -
Hey!
This sounds great. Can you give me some tips or advices how to get this behavior?
Best regards!0 -
we use a custem new table, to import the records. Error handling and three maps with files, accepted/not accepted/processing. When not accepted, you ccan transfer the file to the map not accepted and delete the record(s) in the new customized table, related to this file. Then after accepted, transfer the records to the 'real table'.
but of course there are more options to solve this issue.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