4 Replies Latest reply on Jun 2, 2014 12:45 PM by MarkOrmesher

    Display three dates either side - Portal filter?

    MarkOrmesher

      Title

      Display three dates either side - Portal filter?

      Post


           Hi

            

           Sorry Noobie here...

           I have a requirement to show events on a given date and those three dates either side.

           What I have so far is a table with "Date" global field, then fields of Date-1, Date-2, Date-3 and Date+1, Date+2, Date+3 as calculation fields that use the Date field as the date then subtract the relevant amount of days.

           That's OK....

           So I have a simple Portal setup so Date controls the records shown below, but I'm having an issue in adding the other portals for the other dates.

           Am I using the correct method with calculated fileds/global field?

            

           I guess what I'm trying to do is create seven portals on one screen driven from seven seperate date fields. It seems like it should be simple, but I'm having difficulty seeing how I can make this happen.

            

           Any help at all will be helpful!

            

           Thanks!!

            

            

        • 1. Re: Display three dates either side - Portal filter?
          philmodjunk

               So if you have an event date of 6/1/2014 (MMDDYYYY), you want the dates for 6/2/2014, 6/3/2014, 6/4/2014 and 5/31/2014, 5/30/2047 and 5/29/14?

               This portal filter could list all related records with such dates in a single portal:

               LayoutTable::EventDate - 3 < PortalTable::Date And LayoutTable::EventDate + 3 > PortalTable::Date

               This can also be set up with no portal filter expression if you have a match field of the 7 dates, each separated by a return as one of the match field pairs of fields in your relationship.

          • 2. Re: Display three dates either side - Portal filter?
            MarkOrmesher

                 Thanks!

                  

                 I see, I'm trying to get the three dates either side to show in separate columns though. If you think of it as a five day scrollable window, so you'd see the control date in the center and then the three dates either side.

                  

                 I run a small hostal, so the date portals contain guest names, room numbers and checkout dates. So I can see at any given date who is here and if they were here the days before and after the given control date.

                  

                 I've been drawn to the examples of people setting up calendars with Global variables instead of the Global fields, but I'm just learning and am having problems filtering the portals to the variables.

            • 3. Re: Display three dates either side - Portal filter?
              philmodjunk

                   Then you can set up one row portals, each with either a different relationship or a different portal filter to get your columns of information.

                   The filter expressions might look like this:

                   LayoutTable::EventDate - 3 = PortalTable::Date
                   LayoutTable::EventDate - 2 = PortalTable::Date
                   LayoutTable::EventDate - 1 = PortalTable::Date
                   LayoutTable::EventDate = PortalTable::Date
                   LayoutTable::EventDate + 1 = PortalTable::Date
                   LayoutTable::EventDate + 2 = PortalTable::Date
                   LayoutTable::EventDate + 3 = PortalTable::Date

                   Where each row above is a filter for a different portal.

              • 4. Re: Display three dates either side - Portal filter?
                MarkOrmesher

                     Brilliant!

                      

                     Thank you thank you!!

                      

                     Filemaker is new to me and while so very intuitive, there's some things I'm struggling to grasp.

                      

                     Thank you for your help, you've ended days of frustrated hair pulling!