CustomColumn countOptions: Difference between revisions
From Catglobe Wiki
More actions
jrfconvert import  |
No edit summary  |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
 {{HelpFiles}} | |||
 | |||
====CustomColumn_countOptions==== | ==== CustomColumn_countOptions ==== | ||
Returns the number of custom column options for the custom column passed as argument to the method. | Returns the number of custom column options for the custom column passed as argument to the method. Â | ||
'''Syntax''' | '''Syntax''' Â | ||
CustomColumn_countOptions(''customColumn'') | CustomColumn_countOptions(''customColumn'') Â | ||
'''Arguments''' | '''Arguments''' Â | ||
''customColumn'': is an array. This is the custom column array created by CustomColumn_new function. | ''customColumn'': is an array. This is the custom column array created by CustomColumn_new function. Â | ||
'''Return type''' | '''Return type''' Â | ||
Number | Number  | ||
'''Examples''' | '''Examples''' Â | ||
''array customColumn = CustomColumn_new(CUSTOM_COLUMN_TYPE_NUMBER, "AgeGroup"); '' | |||
'' | ''number countOptions = CustomColumn_countOptions(customColumn); '' | ||
Version 5.5 | ''print(countOptions); //Result: 0'' | ||
__NOTOC__ | Â | ||
<!-- imported from file: 5215.htm--> | ''array customColumnOption_Kid = CustomColumnOption_new("Age < 15", 1, "Kid");'' | ||
 | |||
''CustomColumn_addOption(customColumn, customColumnOption_Kid );'' | |||
 | |||
''countOptions = CustomColumn_countOptions(customColumn); '' | |||
 | |||
''print(countOptions); //Result: 1'' | |||
 | |||
'''Availability''' | |||
 | |||
Version 5.5 __NOTOC__ <!-- imported from file: 5215.htm--> Â | |||
 | |||
[[Category:Data_cache_modifying_CGScript_functions]] | |||
Latest revision as of 10:26, 23 December 2011

CustomColumn_countOptions
Returns the number of custom column options for the custom column passed as argument to the method.
Syntax
CustomColumn_countOptions(customColumn)
Arguments
customColumn: is an array. This is the custom column array created by CustomColumn_new function.
Return type
Number
Examples
array customColumn = CustomColumn_new(CUSTOM_COLUMN_TYPE_NUMBER, "AgeGroup");
number countOptions = CustomColumn_countOptions(customColumn);
print(countOptions); //Result: 0
array customColumnOption_Kid = CustomColumnOption_new("Age < 15", 1, "Kid");
CustomColumn_addOption(customColumn, customColumnOption_Kid );
countOptions = CustomColumn_countOptions(customColumn);
print(countOptions); //Result: 1
Availability
Version 5.5