August 29, 200124 yr Count (Jobs by Company::iOne) The count of the Jobs by Company relationship will return the nunber of jobs for the company. You can then either add 1 to that number (if the new job record has not yet been created. However I strongly suggest that you do not use this kind of scheme for generating a job number. As soon as somebody deletes a job, you are screwed. You could store a seperate Job Counter field in the company database and simply increment this number each time a job is entered, this way you know how many job have ever been entered and will not run into a problem if someone deletes a job record.
August 30, 200124 yr Newbies I am building a database that is a record of jobs. Each job has an initial job number that is a standard 4 figure number which is self generating and sequential. i.e. 0001...0002...0003 etc. Each job also carries a secondary job number that I want to be a figure that calculates the amount of jobs to a particular client then uses the next sequential figure. i.e. we so far have 4 jobs that relate to company one. The next job number that is booked in relating to this client should be as follows: initial job number 0025 (I have just selected a random number here) the secondary job number needs to be "5". I.e. the 5th job relating to company one. How do I formulate the secondary job number?
Create an account or sign in to comment