happymac Posted April 30, 2015 Posted April 30, 2015 I am wondering how globals are treated when running a Perform Script On Server. I know the user that 'starts' the script is the logged in user / account when running the script, so the security permissions are used but are globals independent for each PSOS 'session' or do they carry forward for multiple PSOS scripts? An example might be better to illustrate my questions ... 1) a user runs a script that runs on server 'PSOS' that is set to NOT wait for completion, and in that script some globals are set, then various functions are run 2) the same user immediately runs a different script PSOS that is again not set to wait for completion and this script works with the same global fields. When the second script is run, will the global fields still have the values from the first script OR will the second PSOS start with a blank slate where the globals need to be set fresh?
Wim Decorte Posted April 30, 2015 Posted April 30, 2015 Each PSoS call is the equivalent of the user opening and closing the FMP file. So global fields and all variables do not persist between the user's local session and their PSoS calls or between PSoS calls. 2
happymac Posted May 1, 2015 Author Posted May 1, 2015 Wim, this is very helpful. Thank you very much!
Ocean West Posted May 1, 2015 Posted May 1, 2015 I believe if you also have an on first window open script step that does a lot of house keeping you may need to add some logic and if running on server ignore the bulk of these tasks. Or if you require to have global variables or fields instantiated required for use in your script you need to do so. Any subscripts which may HALT on desktop for normal use will prevent the PSoS from executing.
Recommended Posts
This topic is 3493 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