addAttributeType

This adds a new attribute type (extra field) with the given name to the current domain. Default values will be supplied (ie, it will default to a regular String attribute.)

PARAMETERS

Param 1: object_type -- (string) a valid table name as returned by getAttributeObjectTypes()

Param 2: pname -- (string) the display name of the new attribute type.

Param 3: data_type -- (string) this describes what type of data this Attribute Type is allowed to hold, be it a string of characters, a date, or a number. See the general JXAPI Attribute documentation for more information about data-types.

RETURN VALUE

(string) the ID of the newly created record, if successful.

EXCEPTIONS

A RuntimeError is raised if the object_type is not valid.

A TypeError is raised if the data_type parameter is not a valid data-type description for Attribute Types. See the checkAttributeDataType method.

Arguments

Name Type Description
skey string

object_type string

pname string

data_type string

Return

The addAttributeType method returns a string.