4 Replies Latest reply on Sep 25, 2015 5:08 AM by keywords

    Job Code Creation


      I'm relatively new to FileMaker and I am trying to generate an automatic job code, when a new record is created the job code should automatically be entered into the job code field. The format of the code would be:
      Current Month/ Current Year/ Number - (Which starts at 001 and would reset and start at 001 at the beginning of each year).

      Ex: 8/2015/007

      Please let me know how to generate this unique job code. Thank you in advance for your help with this.




        • 1. Re: Job Code Creation

          Sounds like you need to create a Primary Key(Job Code).


          Use Auto-Enter option with using Calculation for this. Thats the easiest way to solve!!


          Good Luck

          • 2. Re: Job Code Creation

            Yes  the job code  would be the primary key. When I tried using the AutoEnter option along with what I have I have in my calculation field , it removed the date and the year so the Jobe code was just 001. Is there anyway to appended the serial number to what I already have in my calculation field? 


            Thank you for your help.

            • 3. Re: Job Code Creation

              Something like


              Case ( CM <> "" and CY <> "" ;

              SerialIncrement ( Max ( related::job Code ) ; 1 )



              relation using CM and CY

              • 4. Re: Job Code Creation

                I suggest you check the field type. It is possible that if you set it to autoenter a calc (currentMonth/currentYear/serial) but have the field type set to number, that only the serial is being recognised. The same may happen if you had a calc field with the calc result set to number.


                Another trying worth mentioning is that using a MEANINGFUL job code as your primary key you are breaking the well established rule NOT to do this.