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

Edge HMI

TagsDBSetTagProperty

  • Last UpdatedOct 29, 2026
  • 2 minute read

TagsDBSetTagProperty in a built-in function that sets the value of a specified tag property during run time. Tag properties are the metadata on project tags, such as tag name, array size, data type, description, scope, and so on.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

TagsDBSetTagProperty

Tags Database

Synchronous

No

Supported (see Notes below)

Not supported

Not supported

Not supported

Not supported

Syntax

TagsDBSetTagProperty(strTagName,numPropertyID,numOrStrPropertyValue)

TagsDBSetTagProperty ( strTagName , { numPropertyID | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 } ,numOrStrPropertyValue)

strTagName

The name of the project tag on which the tag property will be set.

numPropertyID

The tag property to set, identified by one of the following values:

Value

Property

Data Type

0

Tag name

String

1

Array size

Integer

2

Data type

String ("Boolean", "Integer", "Real", "String", "classname")

3

Description

String

4

Scope

Integer (0 for Local, 1 for Server)

5

Startup value

String

6

Minimum value

Real

7

Maximum value

Real

8

Engineering unit

String

9

Retentive value

Integer (0 for disabled, 1 for enabled)

10

Retentive properties

Integer (0 for disabled, 1 for enabled)

11

Dead band

Real

12

Smoothing

Integer (0 for disabled, 1 for enabled)

13

UA External Availability

Integer (0 for Disabled, 1 for Read Only, 2 for Read/Write)

To set alarm conditions on project tags, use the TagsDBSetAlarm function.

Other tag properties that are not listed above cannot be set during run time.

numOrStrPropertyValue

The value to set to the tag property. The value must be of the appropriate data type.

Return value

This function returns one of the following possible values:

Value

Description

0

Function executed successfully.

-1

The TagsDBBeginEdit function was not executed successfully before this function was called.

-2

Invalid number of parameters.

-3

Wrong parameter type or inconsistent value.

-4

Project tag (as specified by strTagName) does not exist.

Notes

The following restrictions apply to the execution of this function:

  • The function can be executed only on the project runtime server — it cannot be called by a Graphics Script, Screen Script, or Command animation running on a thin client;

  • The TagsDBBeginEdit function must have been executed previously, in order to lock the tags database for editing; and

  • The TagsDBEndEdit function must be executed when the editing is done, in order to release the tags database and resume normal runtime operations.

For more information about the Tags Database functions and examples of how to use them, see Using TagsDB functions to edit the tags database during run time.

In This Topic