DCS removeAllCustomColumns

From Catglobe Wiki
Revision as of 08:54, 26 December 2011 by Cg van (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search




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