Otto Posted January 13, 2023 Share Posted January 13, 2023 I can set the global variables calling a rule in OnRecordStart for the Server to use the values, but when I need to work on the desktop to make changes, I need the global variables set for each rule that I'm working on. I can call the rule to set the variables in each rule, but then when the server runs it, it sets the global variables many times for each rule that is called. How I can have the server only set the global variables once, but let me see the true values for the global variables on the desktop while modify a rule? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted January 18, 2023 Share Posted January 18, 2023 You can certainly assign values to global variables for the job in the JavaScript Globals. Those are truly global, to all rules that are called. (As opposed to variables set in rules, even OnRecordStart. OnJobStart will be a bit more global in lifetime, but not necessarily in scope. The JavaScript Globals is your best bet for global variables and functions.) But I'm not sure exactly what problem you're trying to solve here. Can you be more specific, or maybe post the job files? Quote Link to comment Share on other sites More sharing options...
Otto Posted January 24, 2023 Author Share Posted January 24, 2023 I used the function below to get it to reflect the correct variable data while developing mode and avoid calling OnRecordStart more than once per record on the Server. if (FusionPro.inValidation) Rule("OnRecordStart"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.