4 Replies Latest reply: Nov 30, 2017 12:33 PM by Juan Moreno RSS

    Two date fields, one master calendar

    Juan Moreno

      Hi all,

       

      I have a master calendar that works fine with the "start_date" field that I have in a table called "event". In another table, "link", I have another date field called "link_date".

       

      I would like that when the user filters using the master calendar, his selection affected not only to events, but to links too.

       

      I tried to rename "link_date" as "start_date", but that provokes a loop. What's the best approach to a situation like this?

       

      Thanks,

       

      Juan

        • Re: Two date fields, one master calendar
          omar bensalem

          It would be sthing like this:

           

          here's a script you can use to build a test application and understand how to handle different dates:

          SET DateFormat='YYYY-M-D';

           

           

          Table1:

          LOAD * INLINE [

          ID, Seq, ActivityDate, Value1

          1, 1, 2011-5-10,10

          1, 2, 2011-5-12,2

          2, 1, 2011-5-12,20

          3, 1, 2011-6-15,40

          ];

           

           

          Table2:

          LOAD recno() as ID, * INLINE [

          DepartureDate, ArrivalDate, Value2

          2011-6-15,2011-6-16,5

          2011-6-15,2011-6-17,10

          2011-6-16,2011-6-16,20

          ];

           

           

          OtherTable:

          LOAD recno() as OtherID, * INLINE [

          OtherDate, OtherValue

          2011-5-12,2

          2011-6-15,3

          2011-6-17,5

          ];

           

           

           

           

          Link:

          LOAD

          ID

          ,Seq

          ,ActivityDate as Date

          ,'Activity' as DateType

          RESIDENT Table1

          ;

          CONCATENATE (Link)

          LOAD

          ID

          ,DepartureDate as Date

          ,'Departure' as DateType

          RESIDENT Table2

          ;

          CONCATENATE (Link)

          LOAD

          ID

          ,ArrivalDate as Date

          ,'Arrival' as DateType

          RESIDENT Table2

          ;

          CONCATENATE (Link)

          LOAD

          OtherID

          ,OtherDate as Date

          ,'Other' as DateType

          RESIDENT OtherTable

          ;

           

           

          Calendar:

          LOAD *

          ,date(monthstart(Date),'MMM YYYY') as Month

          ;

          LOAD date(makedate(2011,5,1)+recno()-1) as Date

          AUTOGENERATE 61

          ;

           

           

           

          Capture.PNG

          Capture.PNG

          • Re: Two date fields, one master calendar
            Wallo Atkinson

            Similar to what omar has shown.

             

            Canonical Date

            • Re: Two date fields, one master calendar
              LUIGI ZANETTI

              Hi Juan,

               

              I'm in the same situation: i need to create a master calendar that allows me to drive and measure on two tables both having a date field.

               

              Did you solve the situation?

              How did you do?

               

              I followe what is shown by Mike Tarallo on this video https://www.youtube.com/watch?v=ek_ITfvCnHw

               

              it works fine if I link the master calendar to one table, but I'm not able to link it to two.