DCS countCustomColumns

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



DCS_countCustomColumns

Returns the number of custom columns created in the current DCS context.

Syntax

DCS_countCustomColumns()

Arguments

None

Return type

Number

Examples

array customColumn = CustomColumn_new(CUSTOM_COLUMN_TYPE_NUMBER, "AgeGroup");

customColumn[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(customColumn, customColumnOption_Kid );

CustomColumn_addOption(customColumn, customColumnOption_Teen);

CustomColumn_addOption(customColumn, customColumnOption_Adult);

CustomColumn_addOption(customColumn, customColumnOption_Senior);

bool b = DCS_addCustomColumn(customColumn);

if (b) print("Custom column was added.");

else print("Custom column was not added.");

//Result: Custom column was added.

number n = DCS_countCustomColumns();

print(n); //Result: 1

Availability

Version 5.5