R2D2 Posted May 26, 2009 Posted May 26, 2009 Hi ! How would it be possible to set "constant values" for every user ? I mean I want to set come "constants" (for example values for alarms) that are same for every user regardless they are using FM Client or IWP. If I change a value of a global field from "15" to "5", next time I log in it is again "15". It seems that these Global fields are per session, not "real constants".
Ocean West Posted May 26, 2009 Posted May 26, 2009 You can create a custom function? In terms of global they are session based and the default is based on what was set when the file was last used as single user - not hosted. But if you want a user to change their values independently you would need to create a user preferences table. And use that to store their prefs.
R2D2 Posted May 27, 2009 Author Posted May 27, 2009 Thank you, Ocean West ! Is the custom function the best way to solve this ? I would like to create a "Preferences layout", where these constants can be changed by the admin if needed. So these values are same for every user and privilege set.
Ocean West Posted May 27, 2009 Posted May 27, 2009 (edited) The best way perhaps in this case is to have a table that has one record for "universal" preferences, and allow an admin to navigate to layout and change the values - then in a startup script, transfer the data from the stored values in the table to $$variables or into a table of global fields. Each user who logs in would get the values in the global/variable. If you use $$variables you can set it all in one script step using let. Set $var = Let ([ $$var1 = prefs::yourfield1; $$var2 = prefs::yourfield2; $$var3 = prefs::yourfield3 ]; "" // no result ) This would allow you not to have an non-database person mess with the schema (custom function / define fields ) Of course values would only be propagated to users on their next log in or unless you have some maintenance routine they perform often that would run the script during their current session. Edited May 27, 2009 by Guest
Recommended Posts
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