6 Replies Latest reply on Mar 25, 2015 8:22 AM by MatthewPetersen

    Sequential Numbering For Printing...



      Sequential Numbering For Printing...


      So I am making an application for labeling cartons. It's all pretty straight forward, except I can't figure out how to print sequentially numbered labels. What I would like to be able to do is, if I need 5 carton labels, I would hit print and each label would be numbered 1 of 5, 2 of 5, 3 of 5 etc up to 5 labels being printed, or however many labels I would need. Anyone have any ideas on how to accomplish this? I am not a filemaker expert by any means, but I can pluck my way through pretty well.

      Thanks in advance for any suggestions.

        • 1. Re: Sequential Numbering For Printing...

          And you have one record for each label you print at one time?

          Does 1 of 5 mean that you have 5 labels to print for the current print job?

          If so, you can use the Insert Menu to insert text into a layout text block. Click the text tool while in layout mode and draw a rectangle on your layout approximately where you want this text to go. Then pull down the Insert menu and select the Record Number Symbol option. This will insert text enclosed in {brackets} into your text object that will show the record number when you exit layout mode. Now type in "of " (don't forget the spaces) and then pull down the Insert Menu again. This time select "other symbol..." followed by selecting "found count" as your second symbol.

          You can switch between layout and browse mode to see how this will display on your layout and to better adjust the position, size and text format of this text to provide the numbering specified.

          If my assumptions about how you are printing your labels are incorrect, describe the design of your layout and how you are printing labels in more detail as there are other options that can work for other situations.

          • 2. Re: Sequential Numbering For Printing...

            Thanks for the response. I don't think I described what I'm talking about very well.

            The records in this database would only pertain to how many of a certain product will fit into a box. Using the example I gave before, the "of 5" would be a calculation based on the selected record to determine how many boxes are needed to fill an order. Say 200 pieces of a product fit into the box, I would need 5 box labels for a 1000 piece order. The problem I'm having is being able to have each label for the given order print out in sequence, labeling each as 1 of 5, 2 of 5 etc up to the 5 labels needed for that order. The real problem I see is that this needs to change for each order, some orders could need 50 boxes labeled and printed 1 of, 2 of, etc. What I was hoping to figure out is being able to hit a print button 1 time and it prints out the correct quantity of labels, all numbered and ready to go.

            • 3. Re: Sequential Numbering For Printing...

              What I am describing still works so long as you print only the labels for one order to a print job. This would be very typical if you have a dedicated label printer that prints one label at a time, but not the case if you have a sheet of "avery type" labels and you print as many labels for as many orders all at one time.

              But I am also assuming that your system generates one record for each label, something that can easily be set up from your database if you don't already do that.

              But then again, you might also just be specifying 5 copies of one "page" to get your 5 labels.

              So I suggest describing the exact method that you are currently using to print multiple labels per order.

              • 4. Re: Sequential Numbering For Printing...

                I guess the way I'm thinking of it, It would essentially be 5 copies of the same label but with the sequential numbering on each label. Since the records in the database don't correspond directly to the label being printed, only the quantity of product in the box, and the record of the label doesn't need to be saved since each print job is unique and doesn't repeat. 

                The way I had this is my head was some kind of serial number field that would count upward after each label was printed. 

                • 5. Re: Sequential Numbering For Printing...

                  Yes, but to get your serial number, you will need to have a table with one record per label. Imagine printing a page from MS Word. If you printed that page and specified 5 copies in the print dialog, you'd get 5 identical pages. If, instead, you create a 5 page document with the same information on each page except for the page number, you'd print 1 copy of your document, but get 5 pages numbered 1, 2 , 3...

                  So you'll need to transition to that approach. But this still leaves my main question unanswered: You can buy or set up printers such that all they do is print labels treating each label as a "page" to be printed. You can also buy a letter sized sheet of labels to print from a plain paper printer. With the first approach, we can basically use a "page numbering" approach to get your 1 of 5, 2 of 5 ... output. with the second, you are much more likely to print labels from more than one order at the same time. In that case, you have to use a field that uniquely identifies each order in order to count the number of labels to an order rather than the number of labels in a print job. Both can be done, you'll need to choose the method that you want to use here. (If you print a lot of labels each day, plan on a label printer.)

                  So let's just look at the first part of the process, generating the correct number of label records for a given order as that part of the process will be the same:

                  Say you have the standard invoicing set up with a table for customers, one for orders and one for line items:


                  The shipping address would be stored in Customers, and (likely but not always) copied to Orders with each new order. But you have one record in Orders for each order you have to ship out. The items to pack into the boxes of that shipment would each have a record in lineItems.

                  If this is what you have, you'd add a field in orders called "QtyLabels" to specify the number of labels (or the number of boxes) that you need to fulfill the order. we'll add a labels table to your system like this:


                  Orders::__pkOrderID = Labels::_fkOrderID

                  And a script can generate the records in this table when you are ready to print labels:

                  Set variable [$Qty ; value: Orders::QtyLabels ]
                  Set Variable [$ID ; value: Orders::__pkORderID ]
                  Go to Layout ["Labels" (Labels) ]
                     Set Variable [ $K  ; Value : $K + 1 ]
                     Exit Loop If [$K > $Qty ]
                     New Record/Request
                     Set Field [ Labels::_fkOrderID ; $ID ]
                  End Loop

                  At this point you have the number of labels specified for your order. Your script could immediately print your labels at this point--which would be typical of a dedicated label printer or it could return to your orders layout for you to set up labels records for another order first--which would be typical of printing from a sheet of labels. In either case, your Labels layout would include shipping address fields from either Orders or Customers depending on where that info is stored in your system and fields from orders to include any needed info about the order such as an order number. If you print the labels for one order at a time, you can use the Insert menu while in layout mode to add both the "record number" and "found count" symbols to some layout text to get this text:

                  {{RecordNumber}} of {{FoundCount}}

                  For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

                  • 6. Re: Sequential Numbering For Printing...

                    Ok, this is making a lot of sense to me now! 

                    I do have a dedicated thermal label printer that will be used for this application. 

                    Thank you very much for pointing me in the right direction. Now to the task of actually constructing this.