Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

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
Master III
Master III

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
Champion
Champion

Hi Mark,

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

HTH

antoniotiman
Master III
Master III

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;

markgraham123
Specialist
Specialist
Author

Hi Antonio,

Thanq verymuch.

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

Thanq