Data Iterator reset

Sort:
You are not authorized to post a reply.
Author
Messages
Bill Brennenstuhl
Basic Member
Posts: 14
Basic Member

    I have a flow that gets a list of files from a directory.  I then use a For Each along with a Read File to loop through those files.  Within that, I have a Data Iterator when I read through the line in the file looking for specific text.  My issue is, when the Data Iterator process is completed and I go out and get the next file, do the Read File and then Iterate through the lines again, the recordNumber is at whatever it left off at from the previous file.  How do I get it to start a 1 when I get a new file to iterate through?

    Thanks 

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      I don't think you can. You could create a variable to count the records as you process them and reset that value after reading the next file.
      David Williams
      Bill Brennenstuhl
      Basic Member
      Posts: 14
      Basic Member

        Hi David, 

        Thanks for the reply.  I don't know what happened to my other posting but I figured out what was going on.  Instead of having the flow go to the end of data iterator I had it going to thend of the foreach so it wasn't resetting my iterator loop.  I also realized that I didn't need to iterate through the lines of text, all I needed to do was perform a search on the whole document.

        John Henley
        Posts: 3353
          It sounds like the connections between the iterator nodes were incorrectly connected which can cause what you are seeing. This happens occasionally when you have multiple nested iterators. Glad you’re good now!
          Thanks for using the LawsonGuru.com forums!
          John
          You are not authorized to post a reply.