Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7100 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I have developed a Dispatch program for a small Wheelchair van service. On each record an incident number or run number is assigned to that record. Right now the number goes in sequencel order. What they want is this the record number to reset to 0 at midnight everyday so they can start over with run number 1 unless a trip has been assigned to that day. Here is what I would like to do. Make the runnumber the Julian Date plus the next run number (example 256001...256002...etc). The only thing is they put in trips days ahead or even months (example 12/31/2005 for trip runnumber 365001) so I would need to match the Julain date to the date of service they put in plus the run number in sequencel number. But if the run number is reset everyday at midnight won't that wipe out the run number assigned to the wating call? Hopefully I explained this that everyone can understand.

Edited by Guest
Posted

I'd start by trying to talk the client out of this numbering scheme! (Explaining to them how it will add a minimum of 5 days at $1,000 a day often helps.)

Seriously, you will have to store the run number in a prefs file (file or table with just one record) and script the run creation process so that it updates this run number as required.

However managing the advanced entries will be more difficult: in this case you may need to have a table with each record representing a day, and the run number is updated for the particular record. (The new run process would have to first check if a day record alread exists and create on if it does not.)

Things get complicated very quickly.

Problems may occur if new runs are entered around midnight and some computers have un-synchronised clocks: how disasterous would it be if the run number rolled over to the next day at 11:50 instead of 12:00 if the client's computer clock is set 5 minutes early?

FMP 7 would be better here because it has functions that allow date and time to be pulled off the FM server, not each client computer individually.

Posted

I explained it to them after reading your post and they didn't like the figures so they have aggreed to just do the julian date plus the run number and resetting the run number. Can you explain the script step by step as how to do this?

Thanks

This topic is 7100 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.