FindCategory method (Graphs in DataWindows)
Description
Obtains the number of a category in a graph when you know
the category’s label. The category values label the category
axis.
Controls
PowerBuilder DataWindow DataWindow
control
DataWindow Web ActiveX DataWindow
control
Syntax
[PowerBuilder]
1 |
integer <span>dwcontrol</span>.<span>FindCategory</span> ( string <span>graphcontrol</span>, <br> date <span>categoryvalue</span> )<br>integer <span>dwcontrol</span>.<span>FindCategory</span> ( string <span>graphcontrol</span>, <br> datetime <span>categoryvalue</span> )<br>integer <span>dwcontrol</span>.<span>FindCategory</span> ( string <span>graphcontrol</span>, <br> double <span>categoryvalue</span> )<br>integer <span>dwcontrol</span>.<span>FindCategory</span> ( string <span>graphcontrol</span>, <br> string <span>categoryvalue</span> )<br>integer <span>dwcontrol</span>.<span>FindCategory</span> ( string <span>graphcontrol</span>, <br> time <span>categoryvalue</span> ) |
[Web ActiveX]
1 |
number <span>dwcontrol</span>.<span>FindCategory</span> ( string <span>graphcontrol</span>, <br> any <span>categoryvalue</span> ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to the DataWindow control |
graphcontrol |
A string whose value is the name of the |
categoryvalue |
A value that is the category for which |
Return Values
Returns the number of the category named in categoryvalue in
the graph. If an error occurs, FindCategory returns
-1. If any argument’s value is null, FindCategory returns
null.
Usage
Most of the category manipulation functions require a category
number, rather than a name. However, when you delete and insert
categories, existing categories are renumbered to keep the numbering
consecutive. Use FindCategory when you know only
a category’s label or when the numbering might have changed.
Examples
These statements obtain the number of the category
named Qty in the graph gr_computers in the DataWindow control
dw_equipment:
1 |
integer CategoryNbr |
1 |
CategoryNbr = & |
1 |
dw_equipment.<span>FindCategory</span>("gr_computers", "Qty") |