SetTagValue

Sets the value of the specified tag in the project tags database.

Function Group Execution Windows Embedded Thin Client Mobile Access
SetTagValue Tags Database Synchronous Supported Supported Supported Supported

Syntax

  SetTagValue( "strTagName", TagValue )  
strTagName
The name of the tag that you want to set.
Note: The tag name should be enclosed in quotes, as shown in the syntax diagram, or else the function will try to use the value of the tag.
TagValue
The new value to be set to the specified tag.

Returned value

Value Description
−1 Invalid tag name
0 No error

Examples

Tag Name Expression
TagA SetTagValue( “TagA”, “Hello” ) // Return = Hello
TagA SetTagValue( “TagA”, 123 ) // Return = 123
TagA TagB = 15 SetTagValue( “TagA”, TagB ) // Return = 15

SetTagValue