QPR Knowledge Base 2017.1

SetStatuses

SetStatuses

Previous topic Next topic No directory for this topic  

SetStatuses

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

 

Set statuses for one or more elements/periods/series.

 

Synopsis:

 

SCModel.SetStatuses(ElementId, Statuses)

 

Parameters:

 

ElementId: Integer. If this is 0, the Statuses array must contain columns for measure identifier and scorecard identifier.

Statuses: Two-dimensional array with either 3 or 5 columns depending on the value of ElementId. The array can contain one or more rows with the following format:

Measure identifier. String. Supplied only if ElementId = 0.

Scorecard identifier. String. Supplied only if ElementId = 0.

Series identifier. String. Identifier of the series for which status is set.

Date. String. Date to determine for which period the status is set. You can define the date in three ways: By period index, by period name, or by date. To define a period index, prefix the value with a #, i.e. "#5" would make the value to be set for the fifth period. To define the target period by the period name, prefix the value with a $, e.g. "$Q3/2009". To define the period by a date, input the date without any special control characters. Date strings are first interpreted using the system locale formatting settings, and in the case that fails, using the ISO standard settings (yyyy-mm-dd hh:mm:ss).

Status: String. Name of the status to set. If this is empty, the existing status is cleared.

 

Required Rights:

 

Administrator or Model Administrator rights to the SCModel.

 

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_OBJECT_NOT_FOUND

RV_INVALID_ELEMENT_TYPE

RV_INVALID_DATE

RV_LOCKED_PERIODS_SKIPPED

RV_UNKNOWN_ERROR

 

Example Procedure:

 

iRet = SCModel.SetStatuses(id, arrStatuses)