10 Replies Latest reply on Jan 2, 2010 10:46 AM by Pichi

    help with the auto serial number

    Pichi

      Title

      help with the auto serial number

      Post

      Hello i´m new on this forum, and I need somebody help!

       

      This is my problem i´m made my own invoice program, and i have my master layout, this one have a auto enter serial number, but also i have 3 more layout on each one i need to put a auto serial number but must be different front eht master layout, I mean I use a new record and in the master layout put all the info from my client (here i have the master serial) and i need in case to need a invoice send the data to the invoice layout and i need the master serial number, plus the serial number (should be different from the master)for the invoice...

       

      someone can help me?

        • 1. Re: help with the auto serial number
          ninja
            

          Howdy Pichi,

           

          Could you describe your table architecture a little bit?  You mention layouts but you don't describe if they are on different tables or how such tables are related.

           

          You can have multiple fields with autoentered serial numbers...it sounds like you currently have one Serial field but are asking how to make three more.  Simply create three more fields (each in the table holding the pertinent records, of course) and set these fields to also be autoenter serial#'s.

           

          If you have multiples, I would think about making the serial fields text fields and putting a prefix before the number:

          Mstr000000001, Inv0000001

           

          Note that any related table to the Master table would need the Master Serial for your join, and the Invoice serial too.

           

          is this what you're after?

          • 2. Re: help with the auto serial number
            Pichi
              

            Hi Ninja Thanks for your help

             

            let me try to describe:

             

            I have my master layer here i have all the customer data (from other file) the description of the proyect date, master serial number and i have the table with the description, qty, unit price, discount, total price, the tax and the fianl price, in this layer i have the button to generate invoice, budget, and the job order, each of those buttons send me to the invoice layout, budget layout, so on... (on the same dbase)when the client ask me for a job i put all the data in the master layout to made a budget i send to the client, after that i made the job order and later the invoice, the master serial help me to get a reference to all process but for many reason i need adicional serial number and shour be diferentt from the master, i mean if the master serial going for the 3000, the invoice could be for 1345 and the job order could go for 1200, my problems is if i set all serial with auto enter, when i made a new record all the serial change i need to change on individual way, if i made a new record just the master serial change, if a made a invoice serial is whetn this one should change without change any of the other serial.

             

            I hope i explaing, and sorry for my english...

            • 3. Re: help with the auto serial number
              Pichi
                

              Hi Ninja Thanks for your help

               

              let me try to describe:

               

              I have my master layer here i have all the customer data (from other file) the description of the proyect date, master serial number and i have the table with the description, qty, unit price, discount, total price, the tax and the fianl price, in this layer i have the button to generate invoice, budget, and the job order, each of those buttons send me to the invoice layout, budget layout, so on... (on the same dbase)when the client ask me for a job i put all the data in the master layout to made a budget i send to the client, after that i made the job order and later the invoice, the master serial help me to get a reference to all process but for many reason i need adicional serial number and shour be diferentt from the master, i mean if the master serial going for the 3000, the invoice could be for 1345 and the job order could go for 1200, my problems is if i set all serial with auto enter, when i made a new record all the serial change i need to change on individual way, if i made a new record just the master serial change, if a made a invoice serial is whetn this one should change without change any of the other serial.

               

              I hope i explaing, and sorry for my english...

              • 4. Re: help with the auto serial number
                philmodjunk
                  

                It sounds like you have data in one table that should be separated into different-related tables. THen serial number fields for each table will represent a different series. It sounds like you should have at least the following tables:

                Customer Info

                Invoices

                LineItems (each item listed for purchase on an invoice)

                Budget

                PriceList (each item's ID, current unit price, and description)

                Job Order

                 

                Then each new invoice record would generate numbers in one series: 2345, 2346, 2347. While new Budget records would generate a different series in a different field defined in the budget table: 100, 101, 102.... The same would be true for job orders.

                 

                Other tables may also be needed, but can't tell from your post what those would be.

                • 5. Re: help with the auto serial number
                  Pichi
                    

                  hi!

                   

                  YES! this is exactly what I need; what do you need to help me with this? its posible a script for serial number, all other information i resolved, but my headache is the serial number.

                   

                  thanks

                  • 6. Re: help with the auto serial number
                    philmodjunk
                      

                    No script should be needed for this.

                     

                    Do you know how to define a field so that a serial number is auto-entered?

                     

                    Simply defining such a field in each separate table will give you your different serial number series that you have requested.

                    • 7. Re: help with the auto serial number
                      Pichi
                        

                      Hi!

                       

                      Sorry im a new one on FMP, can you explaing me better?

                      • 8. Re: help with the auto serial number
                        philmodjunk
                          

                        How about this?

                         

                        Select Manage | Database | Fields from the File menu.

                         

                        Create a new number field definition and click options (or just double-click the definition row for an existing field).

                        In the dialog that appears, click the auto-enter tab. Click the check box for "serial number".

                         

                        Do this for each table where you need to have a serial number.

                        • 9. Re: help with the auto serial number
                          Pichi
                            

                          Hi Phil!

                           

                          If i do that every time i made a new record all the serial number will change, I did that the fist time and all my troubles become

                          • 10. Re: help with the auto serial number
                            Pichi
                              

                            Hi Phil!

                             

                             

                            Thanks!   I can do that!