Newbies chizzi Posted May 4, 2004 Newbies Posted May 4, 2004 My database is used for student demographics and other needed data collection for reports. At the beginning of the school year I was able to get help regarding the AGE field from this forum. The formula that was given to me to automatically calculate the age when the DOB was input was grateful [color:"brown"] . Now I have run into the issue of keeping that AGE updated. Is there a way I can do this? The formula I used is: Year(Status(CurrentDate)) - Year(Date of Birth) - (Status(CurrentDate) < Date(Month(Date of Birth), Day(Date of Birth), Year(Status(CurrentDate)))) I would surely appreciate any suggestions!!!
-Queue- Posted May 4, 2004 Posted May 4, 2004 Set the storage options for the field to 'Do not store calculation results'. Calculations with Status functions will not update unless you make them unstored or change a field they reference.
Newbies chizzi Posted May 4, 2004 Author Newbies Posted May 4, 2004 Thank you very much Queue. IT WORKED!!! *high fives* =)
JSRunnels Posted December 25, 2004 Posted December 25, 2004 This looks great and I want to try it for refreshing Annivesary and Birthday calculations in my database. (I am very new at this. - Currently, I just have the calculation set to 2005 - year (birthday), figuring I would update it annually. Like I said, I am very new at this...) I have two questions: 1) How often is the data in the field refreshed? Once a day? Only when you change some data in that record? Every time you access the record? Each time you open the file...? 2) Do I really need 4 )))) at the end of the calculation? Thanks and Merry Christmas!
-Queue- Posted December 25, 2004 Posted December 25, 2004 For version 7, use Year(Get(CurrentDate)) - Year(DOB) - (Get(CurrentDate) < Date( Month(DOB); Day(DOB); Year(Get(CurrentDate)) )) Set it as an unstored calculation by selecting 'Do not store calculation results' in the Storage Options. This will update as soon as the date is changed on a user's machine. Yes, you do need four parens at the end or else there will be too many open parens and FM won't let you create the calculation.
JSRunnels Posted December 25, 2004 Posted December 25, 2004 That works great!! I just can't find where to turn off the storage option. When I go to the storage options for the calculated field, I only have options for global storage and indexing. There is no checkbox to give me the option select 'Do not store calculation results.'
JSRunnels Posted December 25, 2004 Posted December 25, 2004 Nevermind. I figured it out. I had the field type set to "Number" instead of "Calculation." Why do they give you the option to put a calculation in a Number field, anyway. Does the field somehow behave differently if it is a number vs. a calculation...
-Queue- Posted December 26, 2004 Posted December 26, 2004 An auto-enter calculation on a number, text, time, etc. field is similar to a calculation field in version 7. If it has the option 'Do not replace existing value for field' deselected, then whenever one of the fields the calculation references changes, the auto-enter calc will be evaluated. In this case, an auto-enter calculation in a number field would only evaluate when the DOB field was changed, which is not what you want. You want it to be a unstored (true) calculation that reevaluates itself automatically.
Recommended Posts
This topic is 7341 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 accountSign in
Already have an account? Sign in here.
Sign In Now