![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have worked out the 506 format but now need to add the job number. This number must have 3 number eg. 001 or 071 or 161. |
#3
| |||
| |||
|
|
I am writing a Job Book program and I need to add a serial number to records commencing with 1 at the start of each month each month. This will be concatenated with year and month number and shown as a 6 figure number eg the first job in June 2005 will appear as 506001. I have worked out the 506 format but now need to add the job number. This number must have 3 number eg. 001 or 071 or 161. Does anyone know how I would achieve this? Thanking you in anticipation. Dave (I'm using FM7v3 on PC) |
#4
| |||
| |||
|
|
"Job" is an auto-enter serial field. "ID" is the full concatenated serial number you're looking for. You'll need a startup script that checks the date and resets Job to "1" if it is the first of the month. This would require setting a global DateFlag to make sure that it happens only once, the first time the solution is opened: snip |
#5
| |||
| |||
|
|
In article <8ATte.3055$PZ6.1445@trndny08>, "Matt Wills" <I'm (AT) Witz (DOT) end wrote: "Job" is an auto-enter serial field. "ID" is the full concatenated serial number you're looking for. You'll need a startup script that checks the date and resets Job to "1" if it is the first of the month. This would require setting a global DateFlag to make sure that it happens only once, the first time the solution is opened: snip I haven't looked at the script, but there's always an important proviso with Startup Scripts (which may or may not be important in this particular case) - they do not work if the database is going to be run on FileMaker Server. When running on a server the database is rarely closed and opened, so the Startup Script doesn't actually get performed. You also have to be wary of using them if using normal FileMaker to host databases for other people on the network. In this case it probably makes no difference, but in other places you may not want the Startup Script performed on computers that aren't the host computer. Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
I am writing a Job Book program and I need to add a serial number to records commencing with 1 at the start of each month each month. This will be concatenated with year and month number and shown as a 6 figure number eg the first job in June 2005 will appear as 506001. I have worked out the 506 format but now need to add the job number. This number must have 3 number eg. 001 or 071 or 161. Does anyone know how I would achieve this? Thanking you in anticipation. Dave (I'm using FM7v3 on PC) |
#8
| |||
| |||
|
|
Harry, You previously wrote in answer to another enquiry here "Create a Relationship link within the file / table to group together all the records for the same month and year. Then you can use Count(Relationship::Field) to obtain the number of records within the same month instead of using the Serial field. " My brain seems to be fuzzy in regard to how i would do this. Can you please share yr knowledge with me and advise how this is done. |
#9
| |||
| |||
|
|
It seems the more questions I have solved the more that remain unanswered. How do I make the number (the result of a calculation) so that once it is created it cannot be changed. EG. If I use an estimated date the work to calculate the job number, I dont want the job number to change if the date of the job changes. |
![]() |
| Thread Tools | |
| Display Modes | |
| |