9 Replies Latest reply: Oct 19, 2017 7:00 AM by Wim Embrechts RSS

    Field not found in loading script

    Wim Embrechts

      Hi,

       

      I was making a master Calendar and when loading the script I got the error "Field 'a' not found". The script error appeared when I added the bold text. The first load statement of the bold text is the preceding load of the last load statement.

       

      Does anyone sees what's wrong with the script?

      regards,

      Wim

       

       

      Temp_Calendar_Range:

      Load

      num(floor(date(min(DATUM), 'dd/MM/yyyy'))) as MinDate,

        num(floor(date(max(DATUM), 'dd/MM/yyyy'))) as MaxDate

      resident TelWerkgroepstats;

       

       

      //Assign  the start and end dates to variables

      let vMinDate = Peek('Mindate', 0, 'Temp_Calender_Range');

      let vMaxDate = Peek('Maxdate', 0, 'Temp_Calender_Range');

       

       

      drop table  Temp_Calendar_Range; //Cleanup

       

       

      MasterCalendar:

      LOAD DISTINCT

          Year(Temp_Date) * 100 + Month(Temp_Date) as [Period],

          Year(Temp_Date) as [Year],

          Month(Temp_Date) as [Month],

          Date(Temp_Date, 'YYYY-MM') as [Year - Month],

          'Q' & Ceil(Month(Temp_Date) / 3) as [Quarter]

       

       

      ;

      LOAD DISTINCT

          MonthStart($(vMinDate) + IterNo() - 1) as Temp_Date

          AUTOGENERATE (1)

          WHILE $(vMinDate) + IterNo() - 1 <= $(vMaxDate);

       

       

      //--- Remove the temporary variables

      LET vMinDate = Null();

      LET vMaxDate = Null();