Set global variable (script)
This is a technical question.
My labels have some text fields based on equipment values. I created a global variable so I don't have to do this check on each of the fields.
For that, I created a Named Data Source field and put my code in OnProcessData Event Controlled.
Am I doing it right or is there another way to do it?
Thanks in advance!
-
Hello Jose,
Thank you for using our forums!
One of the most important things when working with VB scripts is taking into account when the script is going to be executed. As you can see from your screenshot, when you select an Event you get a brief description of when it is going to be executed:
Besides placing the script on OnProcessData, when the object also has the Script Type - Event Control Scripts:
You can also make use of the following events for executing the script:
For example, if you are working with a database, probably it would make more sense to place the script on the OnNewRecord event:
Let us know if this helps!
0
Please sign in to leave a comment.
Comments
1 comment