Auto update Todays Date record script

  • Follow


I have a Todays Date field that Gets(Current date) with each new
record. I cannot figure out how to get the one record to auto-update to
Get(Current date) every 24 hours. This is necessary because the file is
a "launch pad" that once opened, stays opened indefinitely. Any help
would be greatly appreciated.
Thanks!

1
Reply gfassbach (3) 11/22/2005 1:26:28 PM

In article <1132665988.417582.214060@f14g2000cwb.googlegroups.com>,
"stavrogan" <gfassbach@mac.com> wrote:

> I have a Todays Date field that Gets(Current date) with each new
> record. I cannot figure out how to get the one record to auto-update to
> Get(Current date) every 24 hours. This is necessary because the file is
> a "launch pad" that once opened, stays opened indefinitely. Any help
> would be greatly appreciated.
> Thanks!

Get(CurrentDate) will retrieve the computer's system date whenever the
function is is used. You don't need to store that date anywhere.

This means you can date stamp new records by simply having a Date field
with an auto-enter calculation of Get(CurrentDate).


Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 11/22/2005 7:58:56 PM


Helpful Harry,

Do you mean that it will auto-update in the Current Record after 24
hours?

0
Reply stavrogan 11/23/2005 6:33:27 PM

In article <1132770807.878049.49150@g49g2000cwa.googlegroups.com>,
"stavrogan" <gfassbach@mac.com> wrote:

> Do you mean that it will auto-update in the Current Record after 24
> hours?

If you are simply date-stamping NEW records to know when they were
created, then it doesn't need to update at all. 

     DateField      {Date}
        auto-enter calculation = Get(CurrentDate)

This auto-enter field will be given "today's" date when the record is
created.



If you really want a field to constantly update iteself, then it will
need to be a Calculation field (with Date result) that is Unstored.

     DateField      {Calculation, Date result, Unstored}
         = Get(CurrentDate)

This field will update itself with "today's" date every time the field
is used anywhere (scripts, on-screen, other calculations), and since
the date only changes once per day (unless someone changes the
computer's system date), the field will also change once per day.

BUT there's little point I can see for using such a field since it
simply replicates the Get(CurrentDate) function itself - you may as
well just use the function wheverever you think you need the field. The
only reason I can think of for needing such a field would be for
on-screen / printout use, but then you can simply use the Date symbol
// typed into any text.


Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 11/23/2005 7:49:49 PM

Helpful Harry,

I do have an auto-enter date field that has Todays Date = Calculation,
Unstored=Get (Current Date)
but if a record is created and the user doesn't interact with that
record over the course of 24 hours, the date record does not update
itself. Can I send you a copy of the database to look at?

Thanks!

0
Reply stavrogan 11/29/2005 3:46:10 PM

To be independant from the refreshing, I always get today's date not by 
autoenter but with a script, one line of which makes a copy of the 
Get(CurrentDate) into a permanent field, which, depending of the 
situation, may be a regular field attached to that record, or a global 
field, or even a regular field in a one-record parameter.fp5 file.
Remi-Noel
You may send me your fiel if you wish.

"stavrogan" <gfassbach@mac.com> a �crit dans le message de news:
> Helpful Harry,
>
> I do have an auto-enter date field that has Todays Date = Calculation,
> Unstored=Get (Current Date)
> but if a record is created and the user doesn't interact with that
> record over the course of 24 hours, the date record does not update
> itself. Can I send you a copy of the database to look at?
>
> Thanks!
> 


0
Reply Remi 11/29/2005 7:49:58 PM

In article <1133279170.586926.167960@g49g2000cwa.googlegroups.com>,
"stavrogan" <gfassbach@mac.com> wrote:
> 
> I do have an auto-enter date field that has Todays Date = Calculation,
> Unstored=Get (Current Date)
> but if a record is created and the user doesn't interact with that
> record over the course of 24 hours, the date record does not update
> itself. Can I send you a copy of the database to look at?

I think it sounds like you don't want the date the record is created,
but you want the date the record was last modified / changed.

In that case you don't want a auto-enter calculation. What you need
instead is to use is a Date field with an auto-enter option of "the
Modification Date" (it's in the pop-up menu at the top of the
Auto-Enter window that usually defaults to "Creation Date").

This field will then recieve today's date whenever the record's data is
changed.


If that's not right and what you want is a constantly updating field,
then you need to use a Calculation field (not a normal Date field)
which is set to return a Date result and uses the Get (Current Date)
function ... but as I said before, that's usually pointless field since
you can retrieve today's date in other ways that don't waste record
space.


Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 11/30/2005 7:04:31 AM

6 Replies
873 Views

(page loaded in 0.072 seconds)

Similiar Articles:













7/22/2012 12:12:15 PM


Reply: