Difference between revisions of "CustomColumnOption new"
Cg huyphong (talk | contribs) |
|||
Line 1: | Line 1: | ||
[[Category:Data cache modifying CGScript functions]] | [[Category:Data cache modifying CGScript functions]] | ||
− | | + | {{HelpFiles}} |
====CustomColumnOption_new==== | ====CustomColumnOption_new==== |
Revision as of 10:46, 12 December 2011
CustomColumnOption_new
This function is the CustomColumnOption object's constructor and will return an array which must have 4 elements, configured like specified below:
- OBJECT_TYPE: Object type information which should have the same value as TYPE_CUSTOM_COLUMN_OPTION constant.
- CUSTOM_COLUMN_OPTION_EXPRESSION: The expression for the custom column option, it is the value of the argument expression passed to the constructor function. The expression must be a CG Script expression valid in the current DCS context.
- CUSTOM_COLUMN_OPTION_VALUE: The value of the custom column, it is the value of the argument value passed to the constructor function.
- CUSTOM_COLUMN_OPTION_TEXT: The text of the custom column, it is the value of the argument text passed to the constructor function.
Syntax
CustomColumnOption_new(expression, value[, text])
Arguments
expression: is a string. It must a boolean CG Script expression valid in the current DCS context.
value: is an expression of type number, string or bool . It must have the same data type as the custom column's type, to which the current column option will be added.
text: is a string expression. It is the text used for generating axis option text when the custom column is added to the DCS. This is an optional argument.
Return type
array
Examples
array customColumn = CustomColumn_new(CUSTOM_COLUMN_TYPE_NUMBER, "AgeGroup");
customColumn[CUSTOM_COLUMN_TEXT] = "Age groups";
arrray columnOption = CustomColumnOption_new("Age == [18-45]", 1, "Adult");
CustomColumn_addOption(customColumn, columnOption);
Availability
Version 5.5