Jump to content

Set global variables once


Otto

Recommended Posts

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?
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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");

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...