Contents

Method

Set

ModuleTagging
LibraryCore
Action

Set (or change if already set) the named tag of the specified type to the specified value.

Parameters

Name (string): The name of the tag to set. Only alphanumeric characters are allowed.

Value (string): The value to assign to the tag; can be empty. Only alphanumeric characters are allowed (see notes).

Scopable (boolean; optional):

  • true - Set a Coverage tag (default)
  • false - Set a Freeform tag
Return values

Name (string): The tag's name.

Value (string): The tag's (new) value.

Example
// Set the "WithScanner" freeform tag to "WorkForce DS1630"
Tagging.Set(Name: "WithScanner", Value: "WorkForce DS1630", Scopable: false);
Platforms
  • Windows
  • Linux
  • MacOS
  • Solaris Intel
  • Solaris Sparc
  • Android
Notes

Set() does not allow a NAME=value pair to be set that increases the total size of the scopable tag list above 511 characters, and will return a runtime error.

See Tags page for guidance using tags.

The following methods existing in the Agent Tagging module:

  • Page:
    Tagging.Check — Tests the existence of a named tag of a specified type, optionally with the specified value.
  • Page:
    Tagging.Clear — Delete all tags of the specified type.
  • Page:
    Tagging.Count — Get the quantity of tags of the specified type.
  • Page:
    Tagging.Delete — Delete the named tag of the specified type, and indicate if it originally existed.
  • Page:
    Tagging.Get — Indicate whether a named tag of the specified type is present and return its value if present.
  • Page:
    Tagging.GetAll — Fetch the tag list (containing all tags) of the specified type.
  • Page:
    Tagging.Set — Set (or change if already set) the named tag of the specified type to the specified value.