Today Calculated Field not Updating in FMPro (Pre 7)

  • Follow


I'm an experienced FMPro programmer but recently have been bitten by a
couple of issues I can't figure out.  Here's one:

I have a calculated field that contains today's date.  I understand
that this field apparently will not update except when the dbase is
opened, but the database is shut down every night.  The field works
fine until I place things on a server.  Then the field apparently does
not update itself...ever.  

I can't just refer to the date because I need the date to build a
relational link.  So, how do I solve this?  Can I force a recalculation
somehow, or must I do a replace somehow?

Any thoughts?  I'd certainly like to hear them.


Chuck Boody

-- 
Chuck Boody


x--   100 Proof News - http://www.100ProofNews.com
x--   3,500+ Binary NewsGroups, and over 90,000 other groups
x--   Access to over 1 Terabyte per Day - $8.95/Month
x--   UNLIMITED DOWNLOAD

0
Reply musicmaker (4) 9/24/2004 4:31:12 PM

Chuck Boody wrote:

> I'm an experienced FMPro programmer but recently have been bitten by a
> couple of issues I can't figure out.  Here's one:
> 
> I have a calculated field that contains today's date.  I understand
> that this field apparently will not update except when the dbase is
> opened, but the database is shut down every night.  The field works
> fine until I place things on a server.  Then the field apparently does
> not update itself...ever.  
> 
> I can't just refer to the date because I need the date to build a
> relational link.  So, how do I solve this?  Can I force a recalculation
> somehow, or must I do a replace somehow?
> 

"Today" is no longer supported. It sort of still works (it was like that 
in previous versions too. Use Get(CurrentDate) instead.

0
Reply Kevin 9/24/2004 4:59:28 PM


Kevin Hayes wrote:


> "Today" is no longer supported. It sort of still works (it was like that 
> in previous versions too. Use Get(CurrentDate) instead.
> 

Sorry, you said "pre-7" - that should be Status(CurrentDate).

0
Reply Kevin 9/24/2004 5:05:53 PM

It will update itself if you restart the server each night.  But when 
you get to 7, the Today function does not even exist.  To get around 
this, you can schedule a routine to run each night that updates a 
regular text field in all the records with the current date.

Chuck Boody wrote:
> I'm an experienced FMPro programmer but recently have been bitten by a
> couple of issues I can't figure out.  Here's one:
> 
> I have a calculated field that contains today's date.  I understand
> that this field apparently will not update except when the dbase is
> opened, but the database is shut down every night.  The field works
> fine until I place things on a server.  Then the field apparently does
> not update itself...ever.  
> 
> I can't just refer to the date because I need the date to build a
> relational link.  So, how do I solve this?  Can I force a recalculation
> somehow, or must I do a replace somehow?
> 
> Any thoughts?  I'd certainly like to hear them.
> 
> 
> Chuck Boody
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg              (818) 883-2846
FM Pro Solutions       Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance
0
Reply Howard 9/24/2004 5:38:13 PM

Have you tried using an EVENTS plug-in.  You can set it that it runs at a 
specific time or any time increment.  This way you can have a script run 
that updates the date without the application having to be shut down.

Paul


"Chuck Boody" <musicmaker@mysite.com> wrote in message 
news:240920041131126766%musicmaker@mysite.com...
> I'm an experienced FMPro programmer but recently have been bitten by a
> couple of issues I can't figure out.  Here's one:
>
> I have a calculated field that contains today's date.  I understand
> that this field apparently will not update except when the dbase is
> opened, but the database is shut down every night.  The field works
> fine until I place things on a server.  Then the field apparently does
> not update itself...ever.
>
> I can't just refer to the date because I need the date to build a
> relational link.  So, how do I solve this?  Can I force a recalculation
> somehow, or must I do a replace somehow?
>
> Any thoughts?  I'd certainly like to hear them.
>
>
> Chuck Boody
>
> -- 
> Chuck Boody
>
>
> x--   100 Proof News - http://www.100ProofNews.com
> x--   3,500+ Binary NewsGroups, and over 90,000 other groups
> x--   Access to over 1 Terabyte per Day - $8.95/Month
> x--   UNLIMITED DOWNLOAD
> 


0
Reply Paul 9/24/2004 5:54:14 PM

In article <A6-dnRpk9erUwsncRVn-uw@rogers.com>, Paul
<pzspam@rogers.com> wrote:

> Have you tried using an EVENTS plug-in.  You can set it that it runs at a 
> specific time or any time increment.  This way you can have a script run 
> that updates the date without the application having to be shut down.
> 
> Paul
> 
> 
> "Chuck Boody" <musicmaker@mysite.com> wrote in message 
> news:240920041131126766%musicmaker@mysite.com...
> > I'm an experienced FMPro programmer but recently have been bitten by a
> > couple of issues I can't figure out.  Here's one:
> >
> > I have a calculated field that contains today's date.  I understand
> > that this field apparently will not update except when the dbase is
> > opened, but the database is shut down every night.  The field works
> > fine until I place things on a server.  Then the field apparently does
> > not update itself...ever.
> >
> > I can't just refer to the date because I need the date to build a
> > relational link.  So, how do I solve this?  Can I force a recalculation
> > somehow, or must I do a replace somehow?
> >
> > Any thoughts?  I'd certainly like to hear them.
> >
> >
> > Chuck Boody
> >
> > -- 
> > Chuck Boody
> >
Thanks for all the suggestions.  I'd like to avoid frching an update
somehow and have it "just happen."  I've tried using
"Status(CurrentDate)"  and we'll see how that works.  I certainly will
let the group know...

Chuck Boody


x--   100 Proof News - http://www.100ProofNews.com
x--   3,500+ Binary NewsGroups, and over 90,000 other groups
x--   Access to over 1 Terabyte per Day - $8.95/Month
x--   UNLIMITED DOWNLOAD

0
Reply Chuck 9/24/2004 6:30:40 PM

Err.  FORCING an update in my note below.  Sorry.....


Chuck Boody
In article <240920041330406817%musicmaker@mysite.com>, Chuck Boody
<musicmaker@mysite.com> wrote:

> In article <A6-dnRpk9erUwsncRVn-uw@rogers.com>, Paul
> <pzspam@rogers.com> wrote:
> 
> > Have you tried using an EVENTS plug-in.  You can set it that it runs at a 
> > specific time or any time increment.  This way you can have a script run 
> > that updates the date without the application having to be shut down.
> > 
> > Paul
> > 
> > 
> > "Chuck Boody" <musicmaker@mysite.com> wrote in message 
> > news:240920041131126766%musicmaker@mysite.com...
> > > I'm an experienced FMPro programmer but recently have been bitten by a
> > > couple of issues I can't figure out.  Here's one:
> > >
> > > I have a calculated field that contains today's date.  I understand
> > > that this field apparently will not update except when the dbase is
> > > opened, but the database is shut down every night.  The field works
> > > fine until I place things on a server.  Then the field apparently does
> > > not update itself...ever.
> > >
> > > I can't just refer to the date because I need the date to build a
> > > relational link.  So, how do I solve this?  Can I force a recalculation
> > > somehow, or must I do a replace somehow?
> > >
> > > Any thoughts?  I'd certainly like to hear them.
> > >
> > >
> > > Chuck Boody
> > >
> > > -- 
> > > Chuck Boody
> > >
> Thanks for all the suggestions.  I'd like to avoid frching an update
> somehow and have it "just happen."  I've tried using
> "Status(CurrentDate)"  and we'll see how that works.  I certainly will
> let the group know...
> 
> Chuck Boody
> 
> 
> x--   100 Proof News - http://www.100ProofNews.com
> x--   3,500+ Binary NewsGroups, and over 90,000 other groups
> x--   Access to over 1 Terabyte per Day - $8.95/Month
> x--   UNLIMITED DOWNLOAD
>


x--   100 Proof News - http://www.100ProofNews.com
x--   3,500+ Binary NewsGroups, and over 90,000 other groups
x--   Access to over 1 Terabyte per Day - $8.95/Month
x--   UNLIMITED DOWNLOAD

0
Reply Chuck 9/24/2004 6:42:11 PM

In article <240920041330406817%musicmaker@mysite.com>, Chuck Boody
<musicmaker@mysite.com> wrote:

> Thanks for all the suggestions.  I'd like to avoid frching an update
> somehow and have it "just happen."  I've tried using
> "Status(CurrentDate)"  and we'll see how that works.  I certainly will
> let the group know...
> 
> Chuck Boody

The Today "function" is not really a function at all. It's basically an
internal global field into which FileMaker stores the date when it
first starts up. The stored date is never changed until you quit and
restart Filemaker again.

The Status(CurrentDate) function on the other hand is a proper function
which reads the system date whenever it's used, and so is always
showing the correct date ... assuming the computer has it set properly
in the OS's preferences of course.



Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 9/25/2004 12:59:03 AM

In article <250920041259030382%helpful_harry@nom.de.plume.com>, Helpful
Harry <helpful_harry@nom.de.plume.com> wrote:

> In article <240920041330406817%musicmaker@mysite.com>, Chuck Boody
> <musicmaker@mysite.com> wrote:
> 
> > Thanks for all the suggestions.  I'd like to avoid frching an update
> > somehow and have it "just happen."  I've tried using
> > "Status(CurrentDate)"  and we'll see how that works.  I certainly will
> > let the group know...
> > 
> > Chuck Boody
> 
> The Today "function" is not really a function at all. It's basically an
> internal global field into which FileMaker stores the date when it
> first starts up. The stored date is never changed until you quit and
> restart Filemaker again.
> 
> The Status(CurrentDate) function on the other hand is a proper function
> which reads the system date whenever it's used, and so is always
> showing the correct date ... assuming the computer has it set properly
> in the OS's preferences of course.
> 
> 
> 
> Helpful Harry                   
> Hopefully helping harassed humans happily handle handiwork hardships  ;o)


Learning is a good thing.  Thanks.  If one stops to think of it that
makes good sense.  Doubtless it is even buried somewhere in the FMPro
documentation.  

This difference escaped me, and I think it is going to help me lots now
that I understand it.

Chuck Boody


x--   100 Proof News - http://www.100ProofNews.com
x--   3,500+ Binary NewsGroups, and over 90,000 other groups
x--   Access to over 1 Terabyte per Day - $8.95/Month
x--   UNLIMITED DOWNLOAD

0
Reply Chuck 9/25/2004 2:12:14 AM

8 Replies
409 Views

(page loaded in 0.054 seconds)


Reply: