QPR Knowledge Base 2017.1

GetStatuses

GetStatuses

Previous topic Next topic No directory for this topic  

GetStatuses

Previous topic Next topic Topic directory requires JavaScript Mail us feedback on this topic!  

Revision history:

Introduced in QPR 8.1

Last changed in QPR 2012

 

Returns element values and statuses in ElementValues parameter. If parameter ElementId is 0, then values and statuses for all measures are returned. If SeriesIdentifier is empty, then values and statuses for all series are returned. If PeriodId is 0, then values and statuses for periods are returned.

 

Synopsis:

 

SCModel.GetStatuses(ElementId, SeriesIdentifier, PeriodId, out ElementValues)

 

Parameters:

 

ElementId: Integer. Value 0 refers to all elements

SeriesIdentifier: String. Empty identifier refers to all series. Also constant value _DEFAULT can be used.

PeriodId: Integer. Value 0 refers to all periods. Also the following predefined constants can be used: LATEST = -1, CURRENTPERIOD = -2, PREVIOUS = -5, NEXT = -6. In the case the LATEST period is used, the latest existing value for each series is used, so there might be values from different periods for different series.

ElementValues: Pointer to variant array. The array has one row per value and a row contains the following columns:

Measure identifier, string

Scorecard identifier, string

Series identifier, string

Period name, string

Period start date, string (format depends on operating system's settings)

Period end date, string

Value, double

Range name, string

Range value, double

Indicator color, 4-byte integer value, which represents RGB color for the range

Trend value. integer (-2 = no trend, -1 = down, 0 = middle, 1 = up)

Formatted value, string. Value is formatted using the formatting attributes of the measurement unit.

Value unit, string

Status, string

 

Required Rights:

 

View rights to statuses

 

Return Values:

Below are listed the return values that this function can return:

 

RV_SUCCESS

RV_MODEL_NOT_OPEN

RV_INVALID_PARAMETER

RV_NO_RIGHTS

RV_NO_DATA

RV_INVALID_PERIOD

RV_OBJECT_NOT_FOUND

RV_INVALID_ELEMENT_TYPE

RV_UNKNOWN_ERROR

 

Example Procedure:

 

iRet = oModel.GetStatuses(0, "", 0, Statuses)