August 28, 200916 yr 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, 200916 yr by Guest
August 28, 200916 yr 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, 200916 yr by Guest
August 29, 200916 yr 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.
Create an account or sign in to comment