Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Application Server

Attributes and scripting

  • Last UpdatedJun 24, 2024
  • 1 minute read

Follow these guidelines and best practices when using attributes in scripts:

  • If you use Calculated and Calculated retentive attributes as counters, they must be manually initialized. For example, if you use me.Attribute=me.Attribute+1 as a counter in a script, you must also initialize the attribute with something like me.Attribute=1 or me.Attribute=<some attribute value>.

  • Calculated attributes can be initialized in scripts with Execution type triggers of On Scan and Execute, but not initialized in Startup scripts.

  • If you use an attribute array in a startup script, value and quality may become bad when the array is initialized in the startup script. To prevent this, set the dimension after initializing the array as shown below. This will ensure that the value is set and the attribute quality is good.

    Me.ArrayAttribute[]="0,0,0,0,0,0,0,0,0,0";

    Me.ArrayAttribute.Dimension1 = 10;

  • You must initialize Calculated retentive attributes in Startup scripts and you can initialize these attributes in On Scan and Execute scripts. A Calculated retentive attribute retains the attribute’s current value after a computer restart, redundancy-related failover, or similar situation in which valid checkpoint data is present.

    Your Startup script should contain a statement testing the Boolean value of the Engine.StartingFromCheckpoint attribute on the object’s AppEngine. If the value is TRUE, do not initialize the attribute. If the value is FALSE, initialize the attribute. For more information about Engine.StartingFromCheckpoint, see the help for the AppEngine object, available from the AppEngine object editor.

  • We recommend that you do not use hidden attributes (attribute names that begin with an underscore) in scripts.

TitleResults for “How to create a CRG?”Also Available in