djlane Posted May 22, 2008 Posted May 22, 2008 Hi, I have a bank header table and a transaction table. I need to be able to display transaction records in date ranges in tabbed portals. One tab would show transactions up to and including today, the other tab would show future transactions. I created a global calculation field on the header table using get(currentdate), and used it in the relationship. It semed to be working OK, but then I noticed that the portal was displaying records in the wrong date range. So I displayed the calculated get(currentdate) field on a layout and saw that the problem is the value in the calculation field is wrong - its showing a date of several days ago. On his website, Dwayne Wright http://dwaynewright.blogspot.com/2007/11/filemaker-storage-of-calculations-using.html says that "if not set correctly, the current date used in the calculation isn’t the current date but the stored value when it was last refreshed in the calculation." He suggests using an unstored calculation, but I can't do that with a global field. So, how do I get a global calculation field to continuously show the correct current date? Or do I just not use a global field? thanks
comment Posted May 22, 2008 Posted May 22, 2008 Global calculations are stored, and do not refresh unless a referenced field is modified (same like any other stored calculation). Use an unstored calculation field instead.
mr_vodka Posted May 22, 2008 Posted May 22, 2008 you need to use an unstored calc. The global calc will not recalc like this. If you MUST use a global field, then you can just set a global field with the current date as part of the startup script.
djlane Posted May 22, 2008 Author Posted May 22, 2008 I don't HAVE to use a global field, it just seems like the logical and cleaner thing to do. Why store the current date on every record when one global would (..should) do? So I guess I have to refresh the global with scripting, or else just use a regular calculation field. Is it just me or does that seems clunky?
comment Posted May 22, 2008 Posted May 22, 2008 Why store the current date on every record An unstored calculation is ... well, not stored.
Recommended Posts
This topic is 6089 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