TagsDBSetTrend
- Last UpdatedOct 29, 2026
- 2 minute read
This function assigns a project tag to a trend group.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
TagsDBSetTrend |
Tags Database |
Synchronous |
No |
Supported (see Notes below) |
Not supported |
Not supported |
Not supported |
Not supported |
Syntax
TagsDBSetTrend( strTagName, numProperty, strOrNumVal )
TagsDBSetTrend ( strTagName , { numProperty | 0 | 1 } ,strOrNumVal)
strTagName
The name of the project tag to assign to the trend group.
numProperty
The specific property to be set, identified by one of the following values:
|
Value |
Property |
Data Type |
|---|---|---|
|
0 |
Trend group (or worksheet) number |
Integer |
|
1 |
Log dead band |
Real |
strOrNumVal
The value to set to the specified property. The value must be of the appropriate data type.
Returned value
This function returns one of the following possible values:
|
Value |
Description |
|---|---|
|
-4 |
Project tag (as specified by strTagName) does not exist. |
|
-3 |
Wrong parameter type or inconsistent value. |
|
-2 |
Invalid number of parameters. |
|
-1 |
The function TagsDBBeginEdit was not executed successfully before this function was called. |
|
0 |
Function executed successfully. |
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.
Note: A specific project tag can be in only one trend group at a time. Therefore, when you assign a project tag to a trend group, it will be removed automatically from its previous group, if any.
Also, make sure that a trend group with the correct group/worksheet number actually exists before you try to assign a project tag to it.
Finally, new trends will not start recording until either the system clock changes to a new day or you restart the project.