pietschker Posted January 5, 2005 Posted January 5, 2005 All, I am trying to figure out when (in FP7, single user environment) to use global fields in general, and when to use globally stored calculations. FP7 Help only gives information for shared files; this does not seem to fit my problem. Couldn't find a related topic in the forum or FAQs- pardon me if I missed something. Here's the problem: In FP6, I used to put global values into a dedicated table. To use this value from other tables, for example as a match field to create a relation, I created unstored calculations "copying" that value. (Example: global field in user config table holds a language name like "en"; many other tables need to use that value to find the correct record in a language resource table to get the language-specific values for button names, messages etc.) In FP7 I can define calculations as "global". However, they do not seem to update when I change the original global field. First q.: when do global calculations re-evaluate? Second q.: does it even make sense to use global fields at all? If the table containing the original global field has no records, the global is also invisible from outside. But if I create one (and only one) record anyway, I could as well put the values into that one record and . I'd be grateful for any help or opinion!
pietschker Posted January 5, 2005 Author Posted January 5, 2005 Found the answer to my second q. myself: If the fields are not global, I need a relation to see them; if they are global, a file reference is enough, which reduces clutter in the rel. graphs. Which only makes more important to find an answer to my original (first) q., I am afraid...
pietschker Posted January 6, 2005 Author Posted January 6, 2005 Hm, a couple of hours of "trial and error" seems to tell me that global calculations are *only* re-evaluated when a new record is created in the table. *No* other event (including record deletion) will change the field value. Can anyone confirm this?
-Queue- Posted January 10, 2005 Posted January 10, 2005 It depends on what the global calculation is. If it involves a Get function, then it will probably not update after a record is created unless you use a modification time/timestamp field and use Case( modtime; yourcalc ) to trigger an update. If the calculation involves regular fields, then modifying a record should naturally cause it to update.
pietschker Posted February 22, 2005 Author Posted February 22, 2005 Queue, my problem was that the global calculations used either other global fields or related fields. In both cases a global calculation only re-evaluates when a new record is added to the table. If the global calc. only uses "standard" fields, it will always re-evaluate when any record of the table is changed, and do so using the values from the changed record. This part is actually mentioned in the manual, only a description of the behaviour above was missing. Thanks for helping me along the way!
Recommended Posts
This topic is 7283 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