EventCategory Type

The EventCategory data type represents an event category. This type of object can be instantiated by specifying the category ID (text group: Category), or can be returned by the function getEventCategories.

Syntax

 

var eventCategory = new EventCategory(<id>);

Parameters Usage

Parameter

Type

Default

Use

Annotation

id

Integer

-

Mandatory

Event category numeric identifier

Properties

Property

Type

Description

Id

Integer

Numeric identifier of the event category.

descriptor

String

Localized descriptor of the category.

position

Integer

Position of the category as configured in an event schema (array returned by getEventCategories). The most important category has position equal to 1.

Error Handling

Errors can occur in case:

  • The category ID is not defined in the text group: Category
  • The category ID is not a positive integer

Examples of Use

 

How to create the event category with ID 15 and print it to Console

var category = new EventCategory(15);

console(category)

 

The following is print to the Console expander:

 

id = 15

descriptor = Emergency

position = 1