CustomColumn removeOption
CustomColumn_removeOption
Removes the custom column option with the option index, passed as argument to the method, from the custom column. Returns false if there is no option with the specified index existing, returns true otherwise.
Syntax
CustomColumn_removeOption(customColumn, optionIndex)
Arguments
customColumn: Is an array. This is the custom column array created by CustomColumn_new function.
optionIndex: Is a numeric expression. It is the index of the option returned by CustomColumn_addOption function.
Return type
Boolean
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);
print(customColumn);
//Result: {2,1,AgeGroup,Age groups,{{3,Age < 15,1,Kid},{3,Age == [15-18],2,Teen},{3,Age == [19-45],3,Adult},{3,Age > 45,4,Senior}},}
CustomColumn_removeOption(customColumn, 0);
print(customColumn);
//Result: {2,1,AgeGroup,Age groups,{{3,Age == [15-18],2,Teen},{3,Age == [19-45],3,Adult},{3,Age > 45,4,Senior}},}
Availability
Version 5.5