3 Replies Latest reply: May 4, 2017 6:08 AM by laxman V RSS

    Field not found error while loading master calendar script...

    laxman V

      Hi Everyone ,

      i am getting the "Field '<=' not found" error while loading the Master calendar script.

       

      below is the script what i am running

       

       

       

       

       

      QuartersMap: 

      MAPPING LOAD  

      rowno() as Month, 

      'Q' & Ceil (rowno()/3) as Quarter 

      AUTOGENERATE (12); 

       

      Temp: 

      Load 

                     min(UPDATEDATE) as minDate,  //UPDATEDATE is the name of the date field which i have and it in YYYY/MM/DD formate

                     max(UPDATEDATE) as maxDate 

      Resident Reports; 

       

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

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

      DROP Table Temp; 

       

       

       

       

       

      TempCalendar: 

      LOAD 

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

                     DATE($(varMinDate) + ITERNO() - 1) as TempDate 

                     AUTOGENERATE 1 WHILE $(varMinDate) + ITERNO() -1 <= $(varMaxDate);

       

       

       

      MasterCalendar: 

      Load 

                     TempDate AS UPDATEDATE, 

                     week(TempDate) As Week, 

                     Year(TempDate) As Year, 

                     Month(TempDate) As Month, 

                     Day(TempDate) As Day, 

                     YeartoDate(TempDate)*-1 as CurYTDFlag, 

                     YeartoDate(TempDate,-1)*-1 as LastYTDFlag, 

                     inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12, 

                     date(monthstart(TempDate), 'MMM-YYYY') as MonthYear, 

                     ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter, 

                     Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear, 

                     WeekDay(TempDate) as WeekDay 

      Resident TempCalendar 

      Order By TempDate ASC; 

      Drop Table TempCalendar;