QPR Knowledge Base

CreateElement

Hide Navigation Pane

CreateElement

Previous topic Next topic No expanding text in this topic  

CreateElement

Previous topic Next topic JavaScript is required for expanding text Mail us feedback on this topic!  

Comments (...)

Revision history:

Introduced in QPR 7.2.1

 

Creates a new element to the specified scorecard and under the given ParentId element. Sets also name and symbol. Returns ID of new element in the Id parameter.

 

Synopsis:

 

SCModel.CreateElement(Typeid, Name, Symbol, ScorecardId, ParentId, out Id)

 

Parameters:

 

TypeId: Integer, if 0, then element of default measuretype is created

Name: String

Symbol: String. If this is empty, system generates a symbol for the element

ScorecardId: Integer. Must be ID of some existing scorecard

ParentId: Integer. If this is 0, element is created under the top element

Id: Integer. ID of the created element is returned in this parameter

 

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_NO_RIGHTS

RV_CANNOT_SET_ELEMENT_TYPE

RV_INVALID_NAME

RV_SYMBOL_IS_RESERVED

RV_INVALID_SYMBOL

RV_SCORECARD_NOT_FOUND

RV_PARENT_NOT_FOUND

RV_INVALID_ELEMENT_TYPE

RV_TYPE_NOT_FOUND

RV_UNKNOWN_ERROR

 

Example Procedure:

 

iRet = SCModel.CreateElement(0, "New Element", "", SCId, 0, Id)

 

Comments (...)