JoeDu Posted April 2, 2008 Share Posted April 2, 2008 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? Quote Link to comment Share on other sites More sharing options...
CobaltSky Posted April 3, 2008 Share Posted April 3, 2008 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 Quote Link to comment Share on other sites More sharing options...
JoeDu Posted April 7, 2008 Author Share Posted April 7, 2008 Okay, so should undergo a "seek and destroy" mission to remove any occurrence of the Today function? Quote Link to comment Share on other sites More sharing options...
doughemi Posted April 7, 2008 Share Posted April 7, 2008 Yes, and if you are working in FM6, replace them with Status(CurrentDate) . --Doug Quote Link to comment Share on other sites More sharing options...
Ender Posted April 7, 2008 Share Posted April 7, 2008 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. Quote Link to comment Share on other sites More sharing options...
JoeDu Posted April 7, 2008 Author Share Posted April 7, 2008 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. Quote Link to comment Share on other sites More sharing options...
JoeDu Posted April 7, 2008 Author Share Posted April 7, 2008 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.