Autogenerate is a function that can be used with Load Statement in the script side.
This function is used to generate specified number of rows using script.
For ex: during the calendar table creation this function is used as below.
LET vDateMin = Num(Peek('Start_Date_AP', 0, 'AP_Link_Table'));
LET vDateMax = Num(Peek('End_Date_AP', -1, 'AP_Link_Table'));
LET vDateToday = Num(Today());
$(vDateMin) + RowNo() - 1 AS Date_Key,
Date($(vDateMin) + RowNo() - 1) AS Date
WHILE $(vDateMin)+IterNo()-1<= $(vDateMax);
,Date as EMp_date
//,Day(Date) as Day
//,Week(Date) as Week
,WeekName(Date) as WeekName
//,month(Date) as Month
,MonthName(Date) as MonthName
,MonthName(Date) as Period
,Quartername(Date) as QuarterName
,year(Date) as CalendarYear
,WeekDay(Date) as WeekDay
,text(weekday(Date)) as Week_Day1
DROP Table TempCalendar1;
Let me know if u ve any more questions
Trying the script I have the following error:
Field not found - <<=>
+ RowNo() - 1 AS Date_Key, Date( + RowNo() - 1) AS Date
thanks for aby assistance
AutoGenerate statement takes one parameter that specify the number of rows to generate.
Ex:AutoGenerate(10) - it generates 10 row
Useful when combined with a function such as RecNo() or RowNo()