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

# Load Script Loop & Variable "BLANK"

Hello all,

I am giving a shot here.

Here's my script:

MonthLoop:

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:

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,

• ###### Re: Load Script Loop & Variable "BLANK"

Well, you peek into a table that doesn't exist. DateRange doesn't exist. But DateRanges does.

• ###### Re: Load Script Loop & Variable "BLANK"

wow, can't believe how many hours I spent into this DataRanges.....

Thank you!!