Rich K. Posted August 28, 2009 Posted August 28, 2009 (edited) Hi -- Does anyone have a sample of a "StartUp Global Initializer Script" that will be used to init Global fields? Thanks in advance, Rich Edited August 28, 2009 by Guest
bcooney Posted August 28, 2009 Posted August 28, 2009 (edited) Typically, these scripts do the following: 1. Go to a layout based on your Prefs table 2. Then, for each global/pref pair you use Set Field (gField, prefField). This script is typically called on File Open. PS: Your post title "Server and Global Fields" is misleading. This really has nothing to do with FMS. The only aspect to understand is that each user will have their own values in the global fields for the duration of their session. Edited August 28, 2009 by Guest
Rich K. Posted August 28, 2009 Author Posted August 28, 2009 I'm assuming that this table has 1 record. Is that correct?
bcooney Posted August 29, 2009 Posted August 29, 2009 The Prefs table could have a record per user account. You would get to the correct prefs record using a find in an open script. The Globals table has 1 record, yes. BTW- This isn't the only way to accomplish setting globals. You could: 1. Create global calculation fields that = the prefs fields. 2. Use the Evaluate function to set globals to prefs when a trigger field is updated. 3. Use $$vars (if you don't need to build a relationship off the global). 4. Store Prefs and Globals in the same table. I name them so that they sort by name together: PrefField, PrefField_g.
Recommended Posts
This topic is 5566 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