Jump to content

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

Recommended Posts

Posted

I host a timetables db on my client machine on a Novell/Windows NT network. (Filemaker 4.x) We're stuck with that and do our best.

I am about to go on holidays. Others won't be going and their access to the database poses a problem:

Every monday I have to close down the database and then re-start it or else the date calc fields show the same values as last week. All users' machines show the wrong dates.

I have always put this down to a network problem, but I'm looking for help just in case there's hope in some form of hack which will force a date-lookup.

Take the Calc Monday field for example:

Case(

DayName(Today) = "Sunday", Today+1,

DayName(Today) = "Tuesday", Today-1,

DayName(Today) = "Wednesday", Today-2,

DayName(Today) = "Thursday", Today-3,

DayName(Today) = "Friday", Today+3,

DayName(Today) = "Saturday", Today+2,

Today)

[Works fine for precisely One week, then has to be re-started]

Steve

Posted

I would have to add a warning: If you use Status(CurrentDate) as above, every calculation that depends on this date will become unstored, and every Find that uses it will slow dramatically. (Try a Find on an unstored field to get some idea of whether that is acceptable.) And it has to be Unstored, or it will not update.

There is no easy answer for "date today" if you want to keep it fast. If you use Today as you're doing, then you have to stop and restart the files.

There is a way to Replace [ DateToday field, Status(CurrentDate) ]

This will give you an accurate stored date. You check the date in one record, Show All, and run the script. You can add this to a Login script to be sure it happens. It will only run once a day, 'cause the field data is uniform throughout the file. No one should be using a record at the time (record locking issue). It takes about the same time as Today (a little faster).

It seems however that you are only worried about the Week, not the date. You would want to just check the week then, If [ Week(Date field) = Week (Status(CurrentDate) ) ]

Let use know if that's the way you want to go but need more assistance. There is bit of funny business if you also want to preserve the modification date, which is overwritten by the Replace. Otherwise it's pretty straightforward.

(P.S. You can duplicate the processes, but use a global date field in order to test. Otherwise you'd have to wait a week :-)

Posted

Well, I tried the status(current date) and we still have to re-start the database every Monday.

Now I'll concentrate my efforts at finding a lookup script on startup. Plenty of other colleagues close down their computers over the week end and will be starting up on Mondays.

Steve

This topic is 7725 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.