CustomColumn new
Revision as of 10:46, 12 December 2011 by Cg huyphong (talk | contribs)
CustomColumn_new
This function is the CustomColumn object's constructor and will return an array which must have 5 elements, configured like specified below:
- OBJECT_TYPE: Object type information which should have the same value as TYPE_CUSTOM_COLUMN constant.
- CUSTOM_COLUMN_DATA_TYPE: The type of the custom column, it is the value of the argument dataType passed to the constructor function.
- CUSTOM_COLUMN_NAME: The name of the custom column, it is the value of the argument name passed to the constructor function.
- CUSTOM_COLUMN_TEXT: The text which will be used for the axis created when the column is added to the DCS in the current context. It has "" as the initial value.
- CUSTOM_COLUMN_OPTIONS: The array of custom column options, it is initialized as an array with no elements.
Syntax
CustomColumn_new(dataType, name)
Arguments
dataType: is a number. It is the custom column's data type, it must have one of the following values.
- CUSTOM_COLUMN_TYPE_NUMBER
- CUSTOM_COLUMN_TYPE_BOOLEAN
- CUSTOM_COLUMN_TYPE_STRING
name: is a string expression. It is the custom column's name, which must follow the DCS column name format.
Return type
array
Examples
array customColumn = CustomColumn_new(CUSTOM_COLUMN_TYPE_NUMBER, "AgeGroup");
customColumn[CUSTOM_COLUMN_TEXT] = "Age groups";
Availability
Version 5.5