2 Replies Latest reply on Dec 26, 2013 9:41 AM by AnthonyTesoriero

    Collated Printing from a found set

    AnthonyTesoriero

      Title

      Collated Printing from a found set

      Post

           I am trying to create a script that will batch print multiple forms for a found set in a collated order and am at a loss.

           Using our definitions here is an explanation of what we are trying to accomplish.

           A "deal" for us contains multiple forms (layouts including data from records and layouts that include related records)

           We already have a script that prints all the forms related to an individual deal and it works well albeit slow (it simply is a collection of other scripts that find omit and print data on a layout from the particular record selected) 

           This script prints the forms in a very specific order to enable our employees to simply pull them off the printer and put them in envelopes as a group without having to resort the forms by hand (collated)

           Im now trying to create a script that will do the same thing however for an entire found set

           SO we would search for an auction date, which would find 10 "deals" I would then like to run a script which will print all the forms for each "deal" for all deals in the auction (found set) but in the same specific order so all the documents are collated when printing is  complete...

           I hope my explanation makes sense...

           any help you can provide is appreciated.

            

        • 1. Re: Collated Printing from a found set
          philmodjunk

               It makes sense, but the devil is in the details..

               From a found set of records a script could use a loop to print this set of documents for each record in turn. The possible problem with that approach is that your script might change that found set as part of the printing process. I can't tell from what you have posted if that's a problem or not.

               If it's not an issue, this script can be set up:

               #Perform your find first, either manually or with a script
               Go to Record/Request/Page [first]
               Loop
                  Perform Script [//specify the script that you already have for printing the docs for one person here]
                 Go to Record/Request/Page [Next ; exist after last]
               End Loop

               If it is an issue, there are a number of more complex methods for keeping track of those found records:

                 
          1.           Open a new window for printing your docs and the found set in the original window will not be affected by the script running on data in the new window.
          2.      
          3.           Set up a second layout based on a different table occurrence of the same table. That list of records in the second layout won't then be affected by the print records script and you can loop through them there.
          4.      
          5.           Capture the list of ID's for your found set and store it in a variable. Loop through this list of ID's, performing a find for each record in turn before performing the script to print your records. In FileMaker 13, this is an especially easy thing to do as a new summary field makes it possible to get a list of the ID's for all records in a found set.
          • 2. Re: Collated Printing from a found set
            AnthonyTesoriero

                 Genius! Phil.

                 Thank you the loop and next worked perfectly. The print cue now has 63 pages to go...

                 Fortunately I already had a separate layout for the found set, So all I had to do was put the loop function in the proper place in the script (at the top instead of the bottom) 
                  

                 I have a few more questions related to this same function but I will post in a separate post (after first searching for a possible previous answer) as not to confuse future readers of the forms (see I learn from making that mistake previously)

                 Thanks again

                  

                 Anthony