ejpvi Posted November 16, 2009 Posted November 16, 2009 Does anyone know how to set a default value on global fields. Right now, I can't really make out what determines its initial value. Sometimes it looks like the last thing I picked (as admin) but that isn't always the case.
bcooney Posted November 16, 2009 Posted November 16, 2009 Global values default to the last value held when the file was closed in single-user mode. In any multi-user scenario, it is best practice to not rely on this default, but to explicitly set the global to its pref value in an UpdateGlobals script (probably a subscript to an Open Script).
IdealData Posted November 16, 2009 Posted November 16, 2009 This depends on how you are hosting the database. Global fields will retain their last value when they were last hosted by FMPro/FMPro Advanced. In a peer-to-peer setup, only the HOST can change the default global values, the CLIENTS CANNOT change the default global settings, but will do so for their own working session. IN FMServer setup - no one can change the default global values. These must be set by FMPro (as HOST) prior to uploading to the server.
Fenton Posted November 16, 2009 Posted November 16, 2009 If you have a 1 record table for "constants" and "globals" (or a table each), then there is another possibility, which is a "constant global calculation," that is a calculation with global storage. Generally you'd have the value in a regular field, say a container, then a calculation field which does nothing but equal the regular field, but with its storage set to global. It can be used in cases when you have something which you want to be available everywhere, without needing multiple relationships (from different table occurrence groups). It does not need to be set on startup, as it is always there. But you cannot change it easily, except by going to the Constants table and changing the original field. It is useful for things like button graphics, the business's logo and info, etc., things which seldom change. One glitch is that the calculation takes a little while to update on screens after changing the original, in hosted situations. So it is best for things that change rarely.
Recommended Posts
This topic is 5556 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