3 Replies Latest reply on Jun 3, 2013 10:01 AM by WegnerDerek

    Filtering a Portal Based on a Given Period of Time

    WegnerDerek

      Title

      Filtering a Portal Based on a Given Period of Time

      Post

           So the problem at hand, is that I want to filter my portal so that is shows only records that are invoiced for a given period of time. Much like that of the perform find function. Is there a way to do this? I know it works with one day but with a range I have not been able to find out. 

            

           Any help is appreciated.

        • 1. Re: Filtering a Portal Based on a Given Period of Time
          philmodjunk

               You can use a compound expression with inequality operators as either the portal filter or as match fields in a relationship to limit the portal records to a given time period. And sometimes, it works better to load a text field with a list of all dates from date 1 to date 2 separated by returns and use it as match field in the relationship.

               A possible portal filter expression using inequality operators:

               PortalTable::Date > Globals::gDate1 AND PortalTable::Date < Globals::gDate2

               and then the portal will be filtered to only list records in the interval: gDate1...gDate2.

               While I've used global fields, this is not a requirement in order for this to work. You could also use two date fields defined in the layout's table.

          • 2. Re: Filtering a Portal Based on a Given Period of Time
            WegnerDerek

                 If I create a start date field and an end date field and I write the filter as an inequility, then it only reads the first number listed. say if the range is specified for 1/2/2012  and ends 3/12/2012. Then lets say I have an invoice date 1/1/2012 and 1/3/2013. It brings both records instead of just one. It is only reading the 1. If i change the invoice date to say November so 11/2/2012 it still brings it up. Is there an easier way or what do I have to write. Will it be a script?

            • 3. Re: Filtering a Portal Based on a Given Period of Time
              WegnerDerek

                   I take that back. I had not changed it to a date in the database. It works great now. Thanks for the help.