QPR Knowledge Base 2015.1

SetValues

SetValues

Previous topic Next topic No directory for this topic  

SetValues

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

Revision history:

Introduced in QPR 7.2.1

Last changed in QPR 2012

 

Set values for element identified by ElementId. If the ElementId parameter is omitted (= 0) then measure values are set for every measure and series that are found in the Values data parameter.

 

Synopsis:

 

SCModel.SetValues(ElementId, Values)

 

Parameters:

 

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

Values: Array of either 3 or 5 columns, depending on the ElementId parameter. In the case this array contains an empty string value in the place of the Value string, the existing value is deleted. The array must have the following columns:

MeaIdentifier: String, supplied only if ElementId = 0

SCIdentifier: String, supplied only if Elementid = 0. Note that in the case SCIdentifier is an empty string and MeaIdentifier exists, the first element with a matching MeaIdentifier is affected regardless of scorecard.

SeriesIdentifier: String

Date: String. 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).

Value: String. If the measurement unit type is number, the value is a numerical value. If the measurement unit type is date, the value is datetime and system locale formatting settings are used first to interpret the value, then the ISO standard (yyyy-mm-dd hh:nn:ss). If neither of these datetime formats work, the input is not accepted.

 

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_OBJECT_NOT_FOUND

RV_INVALID_ELEMENT_TYPE

RV_INVALID_DATE  (Values are saved only when RV_SUCCESS is returned)

RV_UNKNOWN_ERROR

 

Example Procedure:

 

iRet = SCModel.SetValues(0, Values)