Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

markgraham123
Valued Contributor

Script execution error

Hi all,

Can someone help me in identify the reason for script failure.

My script is as follows:

Temp:

Load

min([Ship Date]) as minDate,

max([Ship Date])+1 as maxDate

Resident Temp;

Let varMinDate = Num(Peek('minDate', 0, 'Temp'));

Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));

Let varCurrentYear = year(Peek('maxDate'));

Let varCurrentMonth = MonthName(Peek('maxDate'));

Let varCurrentQuarter = QuarterName(Peek('maxDate'));

DROP Table Temp;

TempCalendar:

LOAD

$(varMinDate) + Iterno()-1 As Num,

Date($(varMinDate) + IterNo() - 1) as TempDate

AutoGenerate 1 While $(varMinDate) + IterNo()-1 <= $(varMaxDate);

Error:

TempCalendar:

LOAD

  + Iterno()-1 As Num,

  Date( + IterNo() - 1) as TempDate

AutoGenerate 1 While  + IterNo()-1 <=

   Error: Field not found - <<=>

  General Script Error

Execution Failed

Execution finished.

1 Solution

Accepted Solutions
antoniotiman
Honored Contributor III

Re: Script execution error

Hi Mark,

Your variables varMinDate and varMaxDate are Null because You have

Temp:

Load

min([Ship Date]) as minDate,

max([Ship Date])+1 as maxDate

Resident Temp;

View solution in original post

3 Replies
datanibbler
Esteemed Contributor

Re: Script execution error

Hi Mark,

quite simple, you're missing an item following this mathematical operator.

HTH

antoniotiman
Honored Contributor III

Re: Script execution error

Hi Mark,

Your variables varMinDate and varMaxDate are Null because You have

Temp:

Load

min([Ship Date]) as minDate,

max([Ship Date])+1 as maxDate

Resident Temp;

View solution in original post

markgraham123
Valued Contributor

Re: Script execution error

Hi Antonio,

Thanq verymuch.

Didn't notice that. It was Temp2 which is being loaded in the previous tab.

Thanq