6 Replies Latest reply on Jan 26, 2010 5:48 AM by deltatango

    Generate a serial number for records print out

    Yman

      Title

      Generate a serial number for records print out

      Post

      Hello all, i am a newbie using FM10, i hope i can get some idea or assit for my current project.

       

      For my current stage, i am designing a document log for my company, at this time, i would like to ask how to generate a serial number in the record print out?

       

      I have a database of document with its ref. no., i created a layout for printing out the document logsheet, that mean when there was a new document, 1st input the document information in database and then print out the log sheet for record. But sometimes, there would be several new document have to be included on the same logsheet with a logsheet serial number. How can i do that?

       

      one document -> logsheet with serial number(X)

      several document -> logsheet with serial number(X+1)

        • 1. Re: Generate a serial number for records print out
          ninja
            

          Howdy Yman,

          welcome to the forum.

           

          So If I print a document log today of one document the # is 001

          And if I print a doc log tomorrow of one document, the number is ??? 002?, 001?

          and I print a doc log tomorrow of three documents, the number is ??? 002? 003? 001-1, 001-2, 001-3?

           

          Please describe the end result you are looking for.

           

          Thanks!

          • 2. Re: Generate a serial number for records print out
            Yman
              

            Just increase the serial number by 1

             

            001 002 003 004 005 006 .....

             

            sorry for my description is less,  it is my first time using FM10 and i am checking what kind of problem i have to solve

             

            thx yr help :)

             

             

            • 3. Re: Generate a serial number for records print out
              Yman
                

              doc1 ----> log sheet #001

               

              doc2, doc3, doc4 ---> log sheet #002

               

              doc5, doc6 ----> hold, not yet issued

               

              doc7 --> log sheet #003

               

              .

              .

              .

               

               

              • 4. Re: Generate a serial number for records print out
                deltatango
                  

                I would make a table for the log sheets. Whenever you generate a new log sheet, your script would create a new record in the log sheet table. Then insert the correlating documents using a return delimited list for example, into a text field in the log sheet table:

                 

                Log Sheet Table

                ------------------

                logSheetID (number field,serial)

                Documents (text field) 

                 

                 

                Then create a record:

                 

                1 (value of 1st logsheetID)

                 

                abc.doc

                def.doc

                xyz.doc

                zyx.doc

                 

                (your document list goes into a text field ) 

                • 5. Re: Generate a serial number for records print out
                  Yman
                    

                  Thx your suggestion!!

                   

                  Currently, i have create 2 table, one for logging the Documents(A), one for logging the log Sheets(B)

                   

                  Inside (A), fields are

                   

                  Log Sheet No. 

                  Document No.

                  Document Title

                   

                   

                  Inside (B), field are

                   

                  Log Sheet No.

                  Date Submitted

                  Document No.

                  Document Title

                   

                  I am using Portal in Logsheet layout, and use the log sheet no. for link.

                   

                  Now, i create new record for documents, Doc1, Doc2, Doc3, Doc4.......etc

                   

                  if have to issue Logsheet, i create logsheet record with serial number,  then i put the serial number into the Document, is it the correct direction for this?

                  but if i have to issue many Doc at the same time, i have to put the serial number in numerous Doc record......

                   

                   

                  and for the serial number, there will be prefix like ABC-XYZ-001, ABC-XYZ-002, ABC-XYZ-003, ABC-XYZ-004

                   

                  How to combine prefix with serial number field?

                   

                  • 6. Re: Generate a serial number for records print out
                    deltatango
                      

                    You could make it much simpler on yourself by using a portal.

                     

                    Create 1 more table called logsheetDocs with these fields:

                     

                    recordID (serial Number)

                    logSheetID (number)

                    DocumentID (number)

                     

                    Then create 1 new instance of logsheet table AND document table.

                     

                    Link the new logsheet table occurence to this logSheet ID via logsheet id fields,

                    Link the new document table occurence to this documentID via document id fields,

                    Double click the first relationship and turn on creation of record on the logsheetDocs side. 

                     

                    Create a layout for the log sheet.

                     

                    Add a portal which uses the logsheetDocs table

                     

                    Put the field documentID on the layout and make it editable. Add a value list of the documents table.

                     

                    Now, you can simply select the document and add then to this logsheet!