More actions
Cg huyphong (talk | contribs) No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
'''Examples''' | '''Examples''' | ||
''array customColumn1 = CustomColumn_new(CUSTOM_COLUMN_TYPE_NUMBER, "AgeGroup");'' | |||
''customColumn1[CUSTOM_COLUMN_TEXT] = "Age groups";'' | |||
''array customColumnOption_Kid = CustomColumnOption_new("Age < 15", 1, "Kid");'' | |||
''array customColumnOption_Teen = CustomColumnOption_new("Age == [15-18]", 2, "Teen");'' | |||
''array customColumnOption_Adult = CustomColumnOption_new("Age == [19-45]", 3, "Adult");'' | |||
''array customColumnOption_Senior = CustomColumnOption_new("Age > 45", 4, "Senior");'' | |||
''CustomColumn_addOption(customColumn1, customColumnOption_Kid );'' | |||
''CustomColumn_addOption(customColumn1, customColumnOption_Teen);'' | |||
''CustomColumn_addOption(customColumn1, customColumnOption_Adult);'' | |||
''CustomColumn_addOption(customColumn1, customColumnOption_Senior);'' | |||
''bool b = DCS_addCustomColumn(customColumn1);'' | |||
''if (b) print("Custom column 1 was added.");'' | |||
''else print("Custom column 1 was not added."); //Result: Custom column 1 was added.'' | |||
''number n = DCS_countCustomColumns();'' | |||
''print(n); //Result: 1 '' | |||
''DCS_removeAllCustomColumns();'' | ''DCS_removeAllCustomColumns();'' | ||
''n = DCS_countCustomColumns();'' | |||
''print(n); //Result: 0'' | |||
'''Availability''' | '''Availability''' |
Latest revision as of 07:54, 26 December 2011
DCS_removeAllCustomColumns
Removes all custom columns added through the CustomColumn API in the current DCS context.
Syntax
DCS_removeAllCustomColumns()
Arguments
None
Return type
N/A
Examples
array customColumn1 = CustomColumn_new(CUSTOM_COLUMN_TYPE_NUMBER, "AgeGroup");
customColumn1[CUSTOM_COLUMN_TEXT] = "Age groups";
array customColumnOption_Kid = CustomColumnOption_new("Age < 15", 1, "Kid");
array customColumnOption_Teen = CustomColumnOption_new("Age == [15-18]", 2, "Teen");
array customColumnOption_Adult = CustomColumnOption_new("Age == [19-45]", 3, "Adult");
array customColumnOption_Senior = CustomColumnOption_new("Age > 45", 4, "Senior");
CustomColumn_addOption(customColumn1, customColumnOption_Kid );
CustomColumn_addOption(customColumn1, customColumnOption_Teen);
CustomColumn_addOption(customColumn1, customColumnOption_Adult);
CustomColumn_addOption(customColumn1, customColumnOption_Senior);
bool b = DCS_addCustomColumn(customColumn1);
if (b) print("Custom column 1 was added.");
else print("Custom column 1 was not added."); //Result: Custom column 1 was added.
number n = DCS_countCustomColumns();
print(n); //Result: 1
DCS_removeAllCustomColumns();
n = DCS_countCustomColumns();
print(n); //Result: 0
Availability
Version 5.5