Jump to content

Get current date to update daily


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

Recommended Posts

I set up a project todo list with a container field that shows a blinking gif that says "URGENT" anytime I missed a deadline on a project. The container field is set to compare a field with the current date and another field with a project deadline. If the dealine date passes (as compared to the current date) and the project is still listed as incomplete, then the container field will show the blinking "URGENT" gif. I got it all working great, except I can't seem to get the current date to ever stay current on its own. I found a way to refresh it using a script and a button, but I need it to refresh on its own on a daily basis without me having to close the database and run a script when the document is open. I tried to write an Applescript that would close the document at night and then open it in the morning. That works when I test it, but it errors when I try to schedule the script to run by itself. I alternated between auto-entering the current date and using a calculation field for today's date, but neither worked. The date is automatically entered...but it doesn't change the following day. I'm sure there is a simple way to do this...but I can't seem to figure it out. Any suggestions would be appreciated.

Link to comment
Share on other sites

... i achieve this through scripting, though my tasks list is only a small portion of my database and i just attach it to the navigation required to get there (maybe consider this?).

You could also just use an unstored calculation i suppose..

~Genx

Link to comment
Share on other sites

Is there some reason you can not force the use of a button to view the to-do list? Seems to me a pop-up window showing the to-do list might work well and would give you the oppurtunity to use a set field step. I would suggest pausing the script and making the user close the window before they were allowed to do anything else.

Link to comment
Share on other sites

Thanks for the suggestions. They got me going in the right direction. I had buttons in the database that each user of the todo list would use to view their own projects. Instead of having that button just perform a find, I made it perform a script with the same find criteria and I just stuck in a step where it inserted the current date into the global "Today's Date" field. It doesn't keep the "Today's Date" field updated all the time, but it's a perfect work-around since the first thing anyone does when they go into the database is click on the button with their name on it.

Link to comment
Share on other sites

Ray,

I agree with Queue. Set your TodaysDate field to be an unstored calculation and it will always yield the current date (each time the screen is refreshed). It doesn't have to be a global, it can be a regular table field. We all use variations to get the current date reference into our systems and this works great for me.

Tim

Link to comment
Share on other sites

This topic is 5690 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
 Share

×
×
  • Create New...

Important Information

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