2 Replies Latest reply: Jan 31, 2017 1:18 PM by Samuel Lin RSS

    Load Script Loop & Variable "BLANK"

    Samuel Lin

      Hello all,

       

      I am giving a shot here.

       

      Here's my script:

       

      MonthLoop:

      Load OrderMonth as LoopMonth,

      Date(Min([order date])-1) as LoopMax,

      Date(Min([order date])-90) as 90,

      Date(Min([order date])-180) as 180,

      Date(Min([order date])-270) as 270,

      Date(Min([order date])-365) as 365

      Resident FACTS

      Group by OrderMonth;

       

      DateRanges:

      Load * Inline [Range

      90

      180

      270

      365];

       

      for i = 0 to NoOfRows('MonthLoop')-1

      for j = 0 to NoOfRows('DateRanges')-1

       

      let vRange = Chr(39) & Peek('Range',$(j),'DateRange') & Chr(39);

      let vMonth = Chr(39) & Peek('LoopMonth',$(i),'MonthLoop') & Chr(39);

      let vWhereMin = Chr(39) & Peek($(vRange) ,$(i),'MonthLoop') & Chr(39);

      let vWhereMax = Chr(39) & Peek('LoopMax',$(i),'MonthLoop') & Chr(39);

       

      the loops go through with limited load, but MOST of the times, vRange is "" (empty) and vWhereMin also is "" (empty)

       

      any thought why this is the case?

       

      Thanks,