14 Replies Latest reply: Apr 25, 2016 3:28 PM by Agustín Bobba RSS

    Execution finished by For Statement

    Agustín Bobba



      In my script I use an iteration statement for several loads, then I load other tables; something like this:


      LET v.Product = NoOfRows('$(v.ProductTable)');
      FOR i=0 to $(v.Product)-1
           Load *
           Resident AA;
      Load *
      Resident [Product Detail];



      I execute the Script without Errors, but then realized that the execution of the script was not complete.


      Then I saw on the log and I found that the variable v.Product was equals to -1, so never load the table ProductDetail; this table is out of the for statement.


      My log:

      25-Apr-16 11:46:47: 5437  FOR i=0 to -1
      25-Apr-16 11:46:48:      Execution finished.


      This is a bug?, when the for is from 0 to -1 the scipt stop without error message.






      [Ediit] FOR i=0 to $(v.Product)-1