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

AVEVA™ Manufacturing Execution System 2023 R2

Validation of expression syntax and references

  • Last UpdatedNov 04, 2024
  • 2 minute read

Validation of a raw reason code expression’s syntax and references are handled separately.

  • Syntax validation is performed for templates and instances when the Validate Expression button is clicked, when the object is saved, and when Object Editor is closed. Syntax errors will be reported in the raw reason code status box immediately after the expression validation is completed or, if initiated by closing Object Editor, when the object is reopened in Object Editor.

  • Reference validation is performed for instances (not for templates) only when the Object Editor is closed. Therefore, to see if there are any reference validation errors in the status box for an object instance’s raw reason code expressions, you must close the object and then reopen it in Object Editor.

Errors are generated for syntactically incorrect expressions. Warnings are generated for unresolved references. For information about how these errors are displayed, see Raw reason code validation error messages.

Note that syntax errors take precedence over reference errors. So, if Object Editor is closed and both a syntax and reference error are detected in a raw reason code's expression, only the syntax error will be displayed when the object is reopened in Object Editor. You would not see the reference error until you corrected the syntax error, closed Object Editor, and reopened the object.

Examples of Expression Syntax and Reference Validation Behavior for an UCO Instance

  • If the expression is MyContainer.NonExistentReference == 1 and the Validate Expression button is clicked, no error would be reported even though the reference does not exist because only syntax validation is performed.

  • If the expression is MyContainer.NonExistentReference === 1 and the Validate Expression button is clicked, an error regarding the unexpected equal sign (=) would appear.

  • If the expression is MyContainer.NonExistentReference == 1 and the Object Editor is closed, a warning would be reported for the nonexistent reference.

  • If the expression is MyContainer.NonExistentReference === 1 and the Object Editor is closed, a syntax error would be reported for the unexpected equal sign (=), but the reference error would not be reported.

  • If after reopening the object, the expression MyContainer.NonExistentReference == 1 is fixed to MyContainer.ExistingReference == 1 and the Validate Expression button is clicked or the object is saved, the reference error will still appear, since a reference validation was not performed.

  • If after reopening the object, the expression MyContainer.NonExistentReference === 1 is fixed to MyContainer.NonExistentReference == 1 and the Validate Expression button is clicked or the object is saved, the syntax error will be cleared but the reference error will not be reported. This is because, for validation error message display purposes, the syntax error took precedence over the reference error. The Object Editor would have to be closed and the object reopened to see the reference error in the status box.

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