Data Iterator issue

 2 Replies
 1 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Jessica M
Advanced Member
Posts: 34
Advanced Member

    I am using a data iterator node to read in a file that lists Cost Centers and the related Org Unit abbreviation (something not in Infor, but our IT dept uses it).  This file is parsed by line.  For each employee in the list it runs through this file until it finds the matching cost center.  When it runs through the data iterator for the second, third, etc. employee, it starts reading the file at whatever line it left off with the previous employee.  Instead of starting at line one again.  So for some employees it never finds the correct line because it was line 195, but for this iteration it started at line 282.

    Any thoughts or suggestions on this issue?  Is this the way it should work?  I've used data iterator before and never really had a problem.

     

    Thanks,

    Jessica

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      My suggestion would be to not use the Data Iterator but a JavaScript function (within an Assign). Use a File Access to load the file into memory and JavaScript to do your search.
      David Williams
      Jessica M
      Advanced Member
      Posts: 34
      Advanced Member

        Thank you David.  I assumed there was a better way to do that, but I wasn't sure how.  I am not quite sure how to use the JavaScript to do the search, but that will give me a place to looking.