FindSeries

Description

Obtains the number of a series in a graph when you know the series’ name.

Applies to

PowerBuilder DataWindow DataWindow control

DataWindow Web ActiveX DataWindow control

Syntax

PowerBuilder

integer dwcontrol.FindSeries ( string graphcontrol, string seriesname )

Web ActiveX

number dwcontrol.FindSeries ( string graphcontrol, string seriesname )

Argument

Description

dwcontrol

A reference to the DataWindow control containing the graph

graphcontrol

A string whose value is the name of the graph in the DataWindow control

seriesname

A string whose value is the name of the series for which you want the number

Returns

Returns the number of the series named in seriesname in the graph. If an error occurs, FindSeries returns -1. If any argument’s value is null, FindSeries returns null.

Usage

Most of the series manipulation functions require a series number, rather than a name. Use FindSeries when you know only a series’ name or when the numbering might have changed.

Examples

Example 1

These statements obtain the number of the series named PCs in the graph gr_computers in the DataWindow control dw_equipment and store it in SeriesNbr:

integer SeriesNbr

SeriesNbr = &

		dw_equipment.FindSeries("gr_computers", "PCs")

See also