7 Replies Latest reply: Sep 29, 2016 6:39 PM by Marco Wedel RSS

    Master Calendar for multiple columns

    Michael Andrews

      I followed your master calendar tutorial to get all dates to show. My question is, I have more than one date column I'd like to add this on. Am I going to have to copy and paste the code for each column? Here's what I have now

       

      QuartersMap:  
      MAPPING LOAD   
      rowno() as Month,  
      'Q' & Ceil (rowno()/3) as Quarter  
      AUTOGENERATE (12);  
            
      Temp:  
      Load  
      min(exam_date) as minDate,  
      max(exam_date) as maxDate  
      Resident exam;  
            
      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 exam_date,  
        week(TempDate) As Week,  
        Year(TempDate) As Year,  
        Month(TempDate) As Month,  
        Day(TempDate) As Day,  
        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; 
      

       

      But I also have a cert_date column, as well as a date_updated column. Is there a better way to do that on multiple columns?

       

      Also, none of the date picker extensions out there work for filtering, do you have any suggestions on a better date filter? Honestly, your guys' date filter is pretty lacking.