5 Replies Latest reply on Sep 27, 2014 3:39 PM by erolst

    Label Printing, Saving Last Position

    ramirezp6856

      Does anyone have an elegant solution or suggestion as to how to save the last position of a printed label?

       

      I would like to use my sheets of labels dynamically. Basically, I want to specify which labels are available on the sheet of labels.

       

      I have a feeling I can solve this with conditional formatting but I am not to sure how to start.

        • 1. Re: Label Printing, Saving Last Position
          ariley

          Can you explain what the goal is here? You want to know how many labels you printed out of a batch or something else?

           

          If it is the previous you can mark the printed labels with a 1 in a flag number field. Then you can use conditional formatting to hide or gray out the printed ones.

           

          If it's something else, please explain.

           

          Best regards,

          Agnes Riley

          www.zerobluetech.com

          877 917-9079

           

          Sent from my iPhone

          • 2. Re: Label Printing, Saving Last Position
            ramirezp6856

            Currently I'm using barcode creator and printing out labels from a layout.

             

            The method I use can be seen here:

            https://www.geistinteractive.com/2014/06/02/printing-barcodes-filemaker/

             

            My client has a collection of historical items that need labeling. There is no need for reorder, so once an object is sold the barcode and number should never reappear. I would like to keep track of which labels I've printed with a check box labeled [Printed]. I find it useful because I can use the find function to differentiate what has been printed and what has not. I see within the scripts there is Print and Print Setup but I do not see how those fall into place with what I'm trying to accomplish. Also I am printing from a layout specifically for my object labels.

             

            IF Layout:Avery 8163 printed THEN
                 field [Printed] = 1

            ELSE

                 field [Printed] = 0

             

             

             

            Layout_Avery 8163.jpgObj Ready to Print.jpg

            • 3. Re: Label Printing, Saving Last Position
              erolst

              ramirezp6856 wrote:

              I find it useful because I can use the find function to differentiate what has been printed and what has not. I see within the scripts there is Print and Print Setup but I do not see how those fall into place with what I'm trying to accomplish.

               

              IIUC, to “specify which labels are available on the sheet of labels” you just have to go to your layout and search for records where the flag field is empty.

               

              If you want to print exactly n sheet(s) of unused labels without fiddling in the print dialog …

               

              Go to Layout [ Avery 8163 ( Labels ) ]

              Enter Find Mode

              Set Field [ Labels::printed ; "=" ]

              Perform Find

              # error handling!?

              Set Variable [ $labelCountPerSheet ; 8 ]

              Set Variable [ $sheetsToBePrinted ; 2 ]

              Set Variable [ $recordsToBePrinted ; $labelCountPerSheet * $sheetsToBePrinted ]

              Go to Record [ by calculation: $recordsToBePrinted + 1 ]

              Omit Multiple Records [ Get ( FoundCount ) - $recordsToBePrinted ) ]

              Print [ Records being browsed ]

               

              If you want to see the last used label's position within all labels, find all used labels, go to the last record and show all records.

              • 4. Re: Label Printing, Saving Last Position
                ramirezp6856

                From my Products layout I have a Print Labels button.

                To the left of the button are two checkbox fields labeled Ready to Print and Printed.

                 

                When I click the Print Labels button it implements the following script.

                 

                Go to Layout [ Avery 8163 ( Labels ) ]

                Enter Find Mode[]

                Perform Find

                Print [ Records being browsed ]

                Go to Layout[ Products ]

                Set Field[Products::Printed; 1]

                 

                I would love to know how to iterate through the records like a for loop in JAVA.

                 

                For( i = 0; RecordsArray.length ; i++ )

                     Set Field[Products::Printed; 1]

                     Go to next element in Array.


                I'm failing to see the point with running the steps

                 

                # error handling!?

                Set Variable [ $labelCountPerSheet ; 8 ]

                Set Variable [ $sheetsToBePrinted ; 2 ]

                Set Variable [ $recordsToBePrinted ; $labelCountPerSheet * $sheetsToBePrinted ]

                Go to Record [ by calculation: $recordsToBePrinted + 1 ]

                Omit Multiple Records [ Get ( FoundCount ) - $recordsToBePrinted ) ]

                 

                in the script above.

                • 5. Re: Label Printing, Saving Last Position
                  erolst

                  ramirezp6856 wrote:

                  I'm failing to see the point with running the steps

                   

                  # error handling!?

                  Set Variable [ $labelCountPerSheet ; 8 ]

                  Set Variable [ $sheetsToBePrinted ; 2 ]

                  Set Variable [ $recordsToBePrinted ; $labelCountPerSheet * $sheetsToBePrinted ]

                  Go to Record [ by calculation: $recordsToBePrinted + 1 ]

                  Omit Multiple Records [ Get ( FoundCount ) - $recordsToBePrinted ) ]

                   

                  in the script above.

                   

                  That's because you didn't (and still don't) describe your requirements properly.

                  ramirezp6856 wrote:

                  I would love to know how to iterate through the records like a for loop in JAVA.

                   

                  For( i = 0; RecordsArray.length ; i++ )

                       Set Field[Products::Printed; 1]

                       Go to next element in Array.

                   

                  Loop

                  Set Field [ sometable::someField ; someValue ]

                  Go to Record [ next; exit after last ]

                  End Loop

                   

                  but this is not Java; you could just use

                   

                  Replace Field Contents [ sometable::someField ; someValue ]

                   

                  But what found set would you want to loop through?

                  To the left of the button are two checkbox fields labeled Ready to Print and Printed.

                  Aren't these two mutually exclusive states? Why not just use one field?