Hi all. I have a slight problem, trying to get a serial# into 4 DB's.
Let me explain a bit first. I was recently put in charge of managing Filemaker at work, but unfortunately my boss had already built up 4 seperate DB's, as there are four different types of Works orders we recieve. Had he just built one big one this problem would not exist, but them's the breaks.
So what i've done so far is build, for each DB, a seperate layout called "invoice" which automatically enters componant data, and charge prices, which we then email to the client once the job has been done.
For the invoice# I originally had:
DB1- "HardBoxSets", inv#=BWHB1 (then add one for new record)
DB2- "SoftBoxSets", inv#=BWSB1 and so on.
I would have been finished now except that my boss wants all 4 DB's to share the same "code". example: BW1 and so on.
(i hope i'm explaining this ok).
What I tried to do to rectify this problem, is create a DB called "serial",with a single field called "serial number" (funnily enough). I then told this file to create a new record on open. Then, on one the the four databases I created a button which performed this script:
if[Sbjobs:acked qty > 0]
Open file ["serial"]
Set field[Sbjobs::invoice no; Sbjobs::Invoice no = serial::serial number
close file ["serial"]
end if
If i were to put this on each of the four DB's it should always return the next new number. The problem is I am only getting a true or false return (0 or 1). Can anybody offer a solution or perhaps an alternate way of going about it. Any help would be much appreciated.
Thanks.
Let me explain a bit first. I was recently put in charge of managing Filemaker at work, but unfortunately my boss had already built up 4 seperate DB's, as there are four different types of Works orders we recieve. Had he just built one big one this problem would not exist, but them's the breaks.
So what i've done so far is build, for each DB, a seperate layout called "invoice" which automatically enters componant data, and charge prices, which we then email to the client once the job has been done.
For the invoice# I originally had:
DB1- "HardBoxSets", inv#=BWHB1 (then add one for new record)
DB2- "SoftBoxSets", inv#=BWSB1 and so on.
I would have been finished now except that my boss wants all 4 DB's to share the same "code". example: BW1 and so on.
(i hope i'm explaining this ok).
What I tried to do to rectify this problem, is create a DB called "serial",with a single field called "serial number" (funnily enough). I then told this file to create a new record on open. Then, on one the the four databases I created a button which performed this script:
if[Sbjobs:acked qty > 0]
Open file ["serial"]
Set field[Sbjobs::invoice no; Sbjobs::Invoice no = serial::serial number
close file ["serial"]
end if
If i were to put this on each of the four DB's it should always return the next new number. The problem is I am only getting a true or false return (0 or 1). Can anybody offer a solution or perhaps an alternate way of going about it. Any help would be much appreciated.
Thanks.