CategoryName
PowerScript function
Description
Obtains the category name associated with the specified category
number.
Applies to
Graph controls in windows and user objects, and graphs in DataWindow
controls .
Syntax
|
1 |
controlname.CategoryName ( { graphcontrol, } categorynumber ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the graph in which you want to find the name |
|
graphcontrol (DataWindow control only) (optional) |
A string whose value is the name of the graph in the |
|
categorynumber |
The number of the category for which you want the |
Return value
String.
Returns the name of categorynumber in controlname. If an error
occurs, it returns the empty string (“”). If any argument’s value is null,
CategoryName returns null.
Usage
Categories are numbered consecutively, from 1 to the value returned
by CategoryCount. When you delete a category, the categories are
renumbered to keep the numbering consecutive. You can use CategoryName to
find out the named category associated with a category number.
Examples
These statements obtain the name of category 5 in the graph
gr_product_data:
|
1 2 |
string ls_name ls_name = gr_product_data.CategoryName(5) |
These statements obtain the name of category 5 in the graph
gr_revenues in the DataWindow control dw_findata:
|
1 2 3 |
string ls_name ls_name = & dw_findata.CategoryName("gr_revenues", 5) |
See also