This function returns the name of the first project tag in the tags database. It acts like an array pointer, with the array being the tags database, and it may be used in coordination with the function TagsDBGetNextTag either to generate a list of tags in the tags database or to process the tags one at a time, depending on how you write your script.

Function Group Execution Windows Embedded Thin Client Mobile Access
TagsDBGetFirstTag Tags Database Synchronous Supported (see “Notes” below) Not supported Not supported Not supported


  TagsDBGetFirstTag( optNumProjectOrSystem )  
Web Studio Help ns tagsdb tagsdbgetfirsttag.xml d436541e116 TagsDBGetFirstTag
Determines whether to get the first tag of the user-defined Project Tags or the pre-defined System Tags:
Value Description
0 Project Tags
1 System Tags

This parameter is optional; if you do not specify a tag or value, then the default value is 1.

Returned value

If this function is executed succesfully, then it returns the name of the first project tag. Otherwise, it returns one of the following possible values:
Value Description
-3 No project tags found in the tags database.
-2 Invalid number of parameters.


This function can only be executed on the project server — it cannot be called by a Graphics Script, Screen Script, or Command animation running on a project client.

Also, this function may be called at any time; the function TagsDBBeginEdit does not need to have been executed previously. If that is the case, however, then TagsDBGetFirstTag and TagsDBGetNextTag can only generate a list of classes. They cannot be used, along with with the other Tags Database functions, to edit the classes.

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