1 Reply Latest reply on Jul 8, 2011 3:15 PM by philmodjunk

    Assigning file extension/serial numbers

    RashinAlizadeh

      Title

      Assigning file extension/serial numbers

      Post

      Hi
       
      I am trying to get Filemaker (Pro 11) to automatically assign unique file  numbers to the records being entered into my database.
      The user has to enter in the information for several fields and each field  has a seperate system (different number of digits, going up by different  increments) of being assigned a number. Based on what the user enters, there is  a file extension assigned. The "heading", "Category", and "File" fields are  picked from a drop down menu, rather than being manually typed in by the user.  In brackets I have put how the numbering will work.
       
      Heading 1 (HOne)
      Category 1 (Starting at 100, each category within HOne will go up by  increments of 100)
      File 1 (Starting at 100, each file number will go up by increment of  10)
      Subfile1 (starting at 1, each subfile number will go up by 1)
      Subfile 2
      File 2
      Category 2 (Starting at 100, each category within HTwo will go up  by increments of 100)
      File1 (Starting at 100, each file number will go up by increment of  10)
      Subfile1
      Subfile 2
      File 2
      Category 3
      File1 (Starting at 100, each file number will go up by increment of  10)
      Subfile1
      Subfile 2
      File 2
      Heading 2 (HTwo)
      Category 1 (Starting at 100, each category within HThree will go up by  increments of 100)
      File1 (Starting at 100, each file number will go up by increment of  10)
      Subfile1
      File 2
      Category 2
      File1
      Subfile1
      Subfile 2
      Subfile 3
      File 2
      Heading 3 (HThree)
      Category 1
      File1
      Subfile1
      Subfile 2
      Category 2
      File1
      Subfile1
      Subfile 2
      • Here are a few things I want to get:
      • Based on the Heading, for Filemaker to automatically assign the  predetermined letter extension ( eg.HThree)
      • the serial numbers to be reset back to 100 for each category. So HOne,  HTwo, and HThree will each have a "category" that is extension 100. Because they  are differentiated by the "HOne", "HTwo" then you can have repeats of these  numbers.
      • For me (as the admin) to be able to add New categories, and therefore new  numbers down the road.
      • I'd also like to be able to fit them alphabetically. Suppose Category  1 starting with the letter A, therefore 100; Category 2 starting with letter C,  therefore 200. Then down the road I get a category starting with C which I would  want to make 101. So I would like to leave room for override/manually assigning  numbers (only to be possible with admin privileges).

      Much Thanks!!!!!!

        • 1. Re: Assigning file extension/serial numbers
          philmodjunk

          What in that long list of stuff represents a single record?

          Will there be more than one user accessing the file at the same time and generating these numbers? (Answer yes even if this is just and extremely remote possibility for the future as it is a critical issue here.)

          Under no circumstances, should you use these for the primary key of a record. Use FileMaker's serial number field for that and reserve this system for a label field or fields that identify your data and can be used in searches and sorts, but not to link to related records. (It'll save you a lot of headaches.)