AnsweredAssumed Answered

Loop Ending One Value Early

Question asked by NicholasFernandez on Dec 19, 2013
Latest reply on Dec 19, 2013 by NicholasFernandez

Title

Loop Ending One Value Early

Post

     Hi All,

     I am at a loss:

     My find and replace loop (see attached pdf) is ending one value early in the "replace" category so that all records found for search $AgencySearch[n] have the Source field replaced with blanks.

     The problem persists even if I add 1 to the End If statement, and the number of values of the Find and Replace lists are equal (I know because the second to last pairing works fine).

     The one workaround I have found is to double list the last entry of the $AgencyReplace list. i.e.:

         
  •           $AgencySearch: "one", "two", "three"
  •      
  •           $AgencyReplace: "1", "2", "3", "3" 

     works fine while

      

         
  •           $AgencySearch: "one", "two", "three"
  •      
  •           $AgencyReplace: "1", "2", "3"

     results in all "three" records becoming empty. 

     Any thoughts?

      

Screen_Shot_2013-12-19_at_9.49.40_AM.png

Outcomes