Skip file in XML-import

ElessarElessar 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!

Comments

  • kabrocokabroco Member Posts: 111
    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 guide
  • kabrocokabroco Member Posts: 111
    so you have to find a way to deal with that :wink:
  • ElessarElessar Member Posts: 28
    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!
  • SogSog Member Posts: 1,023
    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.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • ElessarElessar Member Posts: 28
    Hey!

    This sounds great. Can you give me some tips or advices how to get this behavior?

    Best regards!
  • kabrocokabroco Member Posts: 111
    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.
Sign In or Register to comment.