<< Click to Display Table of Contents >>
Manual > Control Reference > Common to all controls > Common methods >
Write a value to a tag.
syntax
WriteVal(
tagName,
value
)
Parameters
tagName
Type:
character
The tag name.
General purpose
The value to write.
Return Value
Boolean
FALSE - Failure. TRUE - Success.
Explanation
Writes a value to a tag, returning TRUE if successful.
WriteVal can be used on objects that have tags registered with AddTag. WriteVal can only write to one tag.
To write to multiple tags at once, use WriteRefresh.
Example
event OnInitialize() { this.AddTag("$D0"); } event OnMouseUp(button) { if (!this.WriteVal ("$D0", 123)) { // Error handling } }
Supported
○
Script Action
Can be used in server script Ver2 actions
Browser script
Can be used in browser scripts
×
Calculation Expression Syntax
Can be used in expression syntax (e.g. bind syntax)
reference
AddTag
DelTag
ClearAllTag
GetVal
ReadVal
WriteVal
ReadRefresh
WriteRefresh
ReadRequest
ReadRequestRefresh
WriteRequest
WriteRequestRefresh