DCS removeCustomColumn

From Catglobe Wiki
Jump to: navigation, search



DCS_removeCustomColumn

Removes the custom column with the name passed as argument to the function. The custom column is removed from the current data cache and the function returns true. If no custom column exists with the specified name then return false.

Syntax

DCS_removeCustomColumn(name)

Arguments

name: Is a string expression. It is the name of the custom column added to the DCS.

Return type

bool

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.

bool c = DCS_removeCustomColumn("AgeGroup");

if (c) print("Custom column 1 was removed."); //Result: Custom column 1 was removed.

else print("Custom column 1 was not removed.");

Availability

Version 5.5