7 Replies Latest reply: Sep 9, 2013 11:23 AM by Alla Kovaleva RSS

    Calendar using .qvc file

      Hi All,

      Could I get two calendars out of two date fields separately?

      Below is the code that I have used:

       

      CODE:

       

      /**********************
      Basic Calendar using defaults
      ***********************/
      // Get min/max values for calendar using "Date" field
      CALL Qvc.GetFieldValues('vDate', 'Date', 'IncidentDetails');
      // Build a Calendar with default name

      CALL Qvc.Calendar(vDate.Min, vDate.Max, 'Fiscal Calendar', '', 4);

      SET vDate.Min=;
      SET vDate.Max=;

      CALL Qvc.Cleanup;

      RENAME Table [Fiscal Calendar] to Temp;

      [Fiscal Calendar]:
      LOAD *,Week(Date) as [Week]
      Resident Temp;

      DROP Table Temp;

      /*******************************Calendar using Survey Date**************************************/

      /**********************
      Basic Calendar using defaults
      ***********************/
      // Get min/max values for calendar using "Date" field
      CALL Qvc.GetFieldValues('vDate', 'SDate', 'SapcrmDump');
      // Build a Calendar with default name

      CALL Qvc.Calendar(vDate.Min, vDate.Max, 'Survey Calendar', 'SurveyCalendar', 4);

      SET vDate.Min=;
      SET vDate.Max=;

      CALL Qvc.Cleanup;

      RENAME Table [Survey Calendar] to STemp;

      [Survey Calendar]:
      LOAD *,Week(SDate) as [SurveyCalendar Week]
      Resident STemp;

      DROP Table STemp;