8 Replies Latest reply on Aug 5, 2010 4:39 AM by Sprucegum

    Page Number Field ?

    jebber6685

      Title

      Page Number Field ?

      Post

      I would like to create a field on each record that is the current page number of the page number in the found set. I want to do this in order to create a Table of Contents.

       

      I know about the ## that will put the current page in the layout for printing. How can I copy this to a field that can then be used in a table of Content?

       

      Is there a function that calculates the current page for a particalar record so that this field could then be used in a table of contents?

       

      Image having 500 products, but having the ability to find some of those products and then having a Table of Contents layout of the found set that has the records page number in the found set as part of the table of contents.

       

      Any help here would be great.

        • 1. Re: Page Number Field ?
          davidanders

          Each product would be on it's own page?

          You will not assign a page number, but it will change depending on the found set?

          Meaning the catalog is not a single document, but a pool of products and some will be in the catalog?

          • 2. Re: Page Number Field ?
            mrvodka

            Well this is how one would normally do a print page of x scenario.

             

            http://forum-en.filemaker.com/t5/Using-FileMaker-Pro/Showing-and-Printing-Page-of-Total-Pages/m-p/54768

             

             

            I am not sure what you are looking for with the table of contents. You could store each section by doing a loop for each section and gather the page numbers.

            • 3. Re: Page Number Field ?
              jebber6685

              I am looking for the capability of creating a dynamic Table of Contents where the page number shown in the Table of Contents can change depending on sort order and or the number of records in the found set.

               

              Image having a File with 1000 records. Each record pertains to a specific product. Now for some customer, you want to create a stream line product brochure. This product brochure would be created by Finding specific products based on specific parameters and then Sorting per a specified sort.

               

              Now this new found set would be essentially an new Product Brochure where the Table of Contents layout would be a single line with Part Number field, Description field and then a Page Number field that is the actual page number in the found / sorted set.

               

              I would then print this Table of Contents page out as PDF, the found set as a PDF in the Product Layout, then combine them all into a single PDF and there you have the custom brochure.

               

              I want to automate the Page Number field so that I do not have to go back and hand enter the found set page sequence into a text Page Number field in the Table of Contents.

              • 4. Re: Page Number Field ?
                JoshJay

                Couldn't you just use the Get(RecordNumber) function to do this?

                • 5. Re: Page Number Field ?
                  jebber6685

                  Thanks for the suggestion, but for whatever reason it does not seem to work.

                   

                  I have 140 product records total in my file. From that set, I performed a Find to get the ones I want; that is 32 records.

                   

                  I then sorted these records by part number so that the are in the right order.

                   

                  So I did a check on one record with part number "open frame XY ". This record's location in the found set is 28. However, this is what I got when I created  Page Number field;

                   

                  Page Number  = get(RecordNumber) result is 46 ; There are only 32 records in the found set! How can this be? Purpose of Get(RecordNumber) is "Returns the number of the current record in the current found set."

                   

                  Anybody have any suggestions? Does the Get(RecordNumber) actually work or is a defective formula?

                  • 6. Re: Page Number Field ?
                    JoshJay

                    Hmm...maybe check indexing or some other setting?  If you can't get it to work, I would say to use a script to fill out those fields like the others were saying.

                    • 7. Re: Page Number Field ?
                      philmodjunk

                      I believe that calculation will need to be set up as an unstored calculation in order for it to update properly. Click the storage options button while defining the calculation to do this.

                      • 8. Re: Page Number Field ?
                        Sprucegum

                        I'd also like to create Tables of Contents in the Title Header or Leading Grand Summary of a layout that dynamically retrieves page numbers for a found set of records, where records (when printed) may require more than 1 page, or share the same page with several other records.

                        Using the <Get(RecordNumber)> or <Get(PageNumber)> functions in a Loop script (as described above) doesn't appear to work (I think these return Page Numbers only when in Preview Mode ... and I don't think a Loop script can operate on records in Preview mode).  I'd welcome a Filemaker solution.  Any other suggestions?

                        For now, I'm considering using EZzslt (http://www.chapsoft.com/products.html) to stream data into a MS Word document template preserving enough formatting to designate appropriate Heading(1-8) styles for all 'like' formatting.  MS Word can then use these to automate a Table of Contents.