3 Replies Latest reply on May 27, 2015 9:45 AM by willrollo

    Filtering records for printing


      Filtering records for printing



      I have looked on the forum but cannot find the answer to this - I was hoping someone could help as it is probably straight forward.


      I have a list of records that I want to print out - However, I want this list filtered and sorted. At the moment I use the omit option in find to filter out the records i want to print. I also use the sort function to show the most recent records at the top of the list (date due field, see below)


      However, I also want to only print out records based on a date field. In other words, in my case, I want this sort of calc to filter the records: Date due=Get(current date)-14. Or, show only records that are due in 14 days time or sooner.

      I tried creating a portal but this limits my find criteria. Or is that the only way?Thank you



        • 1. Re: Filtering records for printing

          When you say 'list of records' are you in List View or in a portal?  You should be in list view.

          You can do multiple find/omits in a script or manually.  If scripted you want to use Constrain Find script step. 

          Try it manually.  After you get your initial set of records, Enter find mode, type in your criteria for the date in the date fields, go to the menu and hit constrain found set.  Then you can sort the records manually.  If this works, when you go to script it, the find criteria should magically reappear (as the last find you performed) and when you select the sort records script step, that sort might just be there too.

          • 2. Re: Filtering records for printing

            See this thread for a series of scripted find examples--including some that use dates: Scripted Find Examples

            as part of one of the examples in the above thread, this step would specify the date part of your find criteria:

            SetField [ YourTable::Date due ; "<" & Get(current date)-14 ]

            This assumes that Date due is a field of type date and not text.

            • 3. Re: Filtering records for printing


              Thank you both. Phil, I never knew that post of yours existed! I have bookmarked it and shall refer to it. 
              My script now works..Wonderful stuff