QPR Knowledge Base 2017.1

GetObjectIdByName

GetObjectIdByName

Previous topic Next topic No directory for this topic  

GetObjectIdByName

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

Revision history:

Introduced in QPR 7.4.1 SP1

 

Returns an object ID corresponding to the object name supplied in the function call.

 

Synopsis:

 

SCModel.GetObjectIdByName(ObjectTypeName, ObjectName, out ObjectId)

 

Parameters:

 

ObjectTypeName: String, case sensitive. The following object types are supported:

ELEMENT

SCORECARD

INFORMATIONITEM

PERIOD

PERIODLEVEL

RANGE

SERIES

VALUESETTING

INTEGRATION

UNIT

CHARTTEMPLATE

PERIODACCUMULATION When using this, the ObjectName parameter must be one of the Periodic Accumulation options (as listed in the Periodic Accumulation drop-down box in the Element Properties window) in the user's current QPR Metrics client user interface language.

ObjectName: String, case insensitive. Name of the desired object of type defined in the ObjectTypeName parameter. For example, if ObjectTypeName is "PERIOD", ObjectName can be e.g. "Q2".

out ObjectId: Integer. Variant for storing the returned object ID.

 

Required Rights:

 

None.

 

Return Values:

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

 

RV_SUCCESS

RV_OBJECT_NOT_FOUND

RV_TYPE_NOT_FOUND

RV_UNKNOWN_ERROR

 

Example Procedure:

 

iRet = oModel.GetObjectIdByName("PERIODACCUMULATION", "Average", iId)