Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Updating records?


JoeDu

Recommended Posts

I have a huge database originally created with FMP4. Every time I open the file, FM updates the records. What is it updating? Wouldn't it already be updated upon closing the file?

Link to comment
Share on other sites

Hi Joe,

Most likely, FileMaker 4 is re-evaluating calculations that use the Today function.

 

In the days of FileMaker 4, the Today function provided a way of retrieving the current date (from the computer's system clock), and needed to be recalculated in order to stay up to date. To achieve this, FileMaker ran through an update whenever a file (that used the Today function in any of its calculations) was opened. When the record set was sizeable, FileMaker posted a dialog saying "Records remaining to calculate: ..." with a decrementing counter, the first time the file was opened on a given date.

 

The Today function was discontinued with the release of FileMaker 7 and, since then, alternative methods have been used to reference the current date. smiley-wink

Link to comment
Share on other sites

I'm afraid it may not be quite that simple. If it were, FileMaker would simply convert all references to the Today function to "Get(CurrentDate)" anyway. (If I recall correctly, I think FileMaker 7 and higher convert the Today function to Get(CurrentDate) when it thinks it's safe to do so, but uses a new field "Today", for everything else. This field then gets updated via script to retain the stored behavior of the previous function.)

 

What you would need to do is figure out where the Today function was being used, and decide for each case, what you can do. If it's used in an unstored calc or script, you can replace it with Get(CurrentDate). If it's used on the many side of a relationship, you'd need to change the relationship around if possible, to put the current date on the parent side. If that's not possible, you'd probably have to live with the stored field and an update script, but change it so it only updates once per day.

Link to comment
Share on other sites

Yes, and if you are working in FM6, replace them with Status(CurrentDate) .

 

 

--Doug

I'm actually on FMP9 Advanced, but I can't change that on my profile. :)

Link to comment
Share on other sites

I'm afraid it may not be quite that simple. If it were, FileMaker would simply convert all references to the Today function to "Get(CurrentDate)" anyway. (If I recall correctly, I think FileMaker 7 and higher convert the Today function to Get(CurrentDate) when it thinks it's safe to do so, but uses a new field "Today", for everything else. This field then gets updated via script to retain the stored behavior of the previous function.)

 

What you would need to do is figure out where the Today function was being used, and decide for each case, what you can do. If it's used in an unstored calc or script, you can replace it with Get(CurrentDate). If it's used on the many side of a relationship, you'd need to change the relationship around if possible, to put the current date on the parent side. If that's not possible, you'd probably have to live with the stored field and an update script, but change it so it only updates once per day.

 

Perfect! Thanks!

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use