QPR Knowledge Base 2017.1

GetProperty

GetProperty

Previous topic Next topic No directory for this topic  

GetProperty

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 2017.1

 

Get value of Element's property. PropertyName is not case sensitive.

 

Synopsis:

 

SCModel.GetProperty(ElementId, PropertyName, out Result)

 

Parameters:

 

ElementId: Integer. ID of any type of element (element, period, alert…)

PropertyName: String. Name of some supported property.

Result: Variant (array). A variant or a variant array is returned in this parameter.

 

The possible properties for the PropertyName parameter are as follows:

ElementID refers to a scorecard:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

DESCRIPTION, String

OWNER, Integer (user ID)

AUTHOR, Integer (user ID)

ELEMENTTYPEID, Integer

SCORECARDID, Integer

CREATEDDATE, Date(double)

MODIFIEDDATE, Date(double)

REFERENCEID, Integer. Provides the ID of the original element in the case of reference elements. With regular elements, this value is 0.

SOURCEMODELID, Integer. This is used with elements referenced from another model. This requires also the SOURCEOBJECTID property to be present.

SOURCEOBJECTID, Integer. This is 0 for all other elements than elements referenced from another model. This requires also the SOURCEMODELID property to be present.

PARENTSCORECARDID, Integer

TOPELEMENTID, Integer

LEVEL. The level on which the scorecard is placed in the hierarchy starting from 0 (root). Integer.

ORDER. Order number of the scorecard within its own branch starting from 0. Sort order affects this value. Integer.

INDEX. The global index number of the scorecard in the entire hierarchy (the hierarchy tree is traversed with the depth-first algorithm). Sort order affects this value. Integer.

BASESCORECARD, Integer

INHERITANCEOPTIONS. A two-dimensional array with 2 columns. The rows have the inheritance options in the first column (one option per row) with the second column containing a flag indicating whether the option is enabled (1) or disabled (0):

name

description

elementtype

measureunit

roles

valuesettings

periodlevel

accumulationrule

viewsettings

seriessettings

values

scorecardstructure

scorecardstructure_noref

scorecardstructure_addonly

ElementID refers to a measure:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

DESCRIPTION, String

AUTHOR, Integer (user ID)

ELEMENTTYPEID, Integer

SCORECARDID, Integer

CREATEDDATE, Date(double)

MODIFIEDDATE, Date(double)

REFERENCEID, Integer

SOURCEMODELID, Integer

SOURCEOBJECTID, Integer

CHILDMEASUREIDS, Array of child measure IDs

PARENTELEMENTID, Integer

MEASUREUNITID, Integer

INCHARGE, Integer (user ID). Returns the user assigned to the primary role defined for the element type.

ACCUMULATIONRULE, Integer:

Sum = 0

Average = 1

Min = 2

Max = 3

First = 4

Last = 5

Sum (ignore null) = 6

Average (ignore null) = 7

None = 8

Latest = 10

VALUESETTINGID, Integer

PERIODLEVELID, Integer

ELEMENTSERIES. A two-dimensional array with 6 columns. One line is returned per ElementSeries and the array has the following columns (properties):

Series Id, Integer

ElementSeries Label, String. The series label defined in the Element Properties dialog.

ElementSeries UnitId, Integer

ElementSeries AccumulationRule, Integer. See the ACCUMULATIONRULE property description for possible values.

ElementSeries Inputtype. The possible values are 0 (Manual input), 1 (Formula), 2 (SQL), or 3 (ADO). Integer.

ElementSeries Formula (empty string if formula does not exist). String.        

INFORMATIONITEM, array of id (integer), identifier (string) and name (string).

INTEGRATION, array of id (integer), identifier (string) and name (string). The following integration types are returned: SQL imports and SQL mass imports. Information items and remote model imports are not included in the array.

LINKEDDATA, array of id (integer), identifier (string) and name (string).

LEVEL. The level on which the measure is placed in the hierarchy starting from 0 (root). Integer.

ORDER. Order number of the measure within its own branch starting from 0. Sort order affects this value. Integer.

INDEX. The global index number of the measure in the entire hierarchy (the hierarchy tree is traversed with the depth-first algorithm, i.e. the position is the row number in a fully expanded hierarchy tree ). Sort order affects this value. Integer.

CHARTTEMPLATE (name of the template). String.

CHARTTEMPLATEID (ID of the template). Integer.

ROLES. Returns a two-dimensional array of roles defined for the measure. One line is returned per role, and the first line returned is the primary role corresponding to "In charge" user in earlier versions of QPR ScoreCard. The array has the following columns:

id, Integer. ID of the role

name, String. Name of the role.

userId, Integer. ID of the user assigned to the role.

DRILLDOWNOPTIONS, a two-dimensional array with two columns. The rows are a freely selectable set of the following drill down options in the first column (one option per row) with the second column containing the value of a subproperty or a flag indicating whether the option should be enabled (1) or disabled (0):

enableautomaticreferencing, Boolean: true | 1 | false | 0.

drilldowndepth, Integer.

referencewithsymbol, Boolean: true | 1 | false | 0. Reference elements with matching Identifier.

referencewithname, Boolean: true | 1 | false | 0. Reference elements with matching Name.

removeunmatching, Boolean: true | 1 | false | 0. Removes unmatching reference elements.

ElementID refers to a period level:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

DESCRIPTION, String

AUTHOR, Integer (user ID)

ELEMENTTYPEID, Integer

PERIODLEVELPREFIX, String

PERIODLEVELTYPE, Integer:

Year = 100

Half year = 200

Third = 300

Quarter = 400

Month = 500

Week = 600

Day = 700

Custom = 800

PERIODLEVELACCUMULATION, Integer:

First day of period = 0

Last day of period = 1

Middle of period = 2

PERIOD, array of id (integer), name (string), identifier (string), start date (date(double)), and end date (date(double)).

LOCKDATEOFFSET, Integer. Offset in days for automatic locking after the end of period.

ISLOCKDATEOFFSETENABLED, Boolean. The automatic locking offset enabled/disabled status.

ElementID refers to a period:

LOCKED, Boolean. The locked/unlocked status of the period level.

ElementID refers to a range:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

DESCRIPTION, String

AUTHOR, Integer (user ID)

ELEMENTTYPEID, Integer

RANGEVALUE, Integer

ElementID refers to a history chart template:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

DESCRIPTION, String

AUTHOR, Integer (user ID)

ELEMENTTYPEID, Integer

ElementID refers to a series:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

DESCRIPTION, String

AUTHOR, Integer (user ID)

ELEMENTTYPEID, Integer

SERIESTYPE, Integer:

Range limit = 0

Normal series = 1

Qualitative series = 2

REVERSEDTREND, Boolean (0 = false, 1 = true)

TRENDTYPE (0 = two period difference, 1 = one period polarity). Integer

DEFAULTFORMULA, String

ElementID refers to a value setting:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

DESCRIPTION, String

AUTHOR, Integer (user ID)

ELEMENTTYPEID, Integer

DEFAULTSERIESID, Integer

FORCEMIN, Boolean (0 = false, 1 = true)

FORCEMAX, Boolean (0 = false, 1 = true)

RANGE, array of id (integer), identifier (string) and name (string).

SERIES, array of id (integer), identifier (string) and name (string).

ElementID refers to a information item:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

DESCRIPTION, String

AUTHOR, Integer (user ID)

ELEMENTTYPEID, Integer

LOCATION, String

ElementID refers to a measure unit:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

DESCRIPTION, String

AUTHOR, Integer (user ID)

ELEMENTTYPEID, Integer

UNITSYMBOL, String

NUMBEROFDECIMALS, Integer

DECIMALSEPARATOR, String

DIGITSINGROUP, Integer

DIGITSEPARATOR, String

UNITBEFOREVALUE, Boolean (0 = false, 1 = true)

ElementID refers to an alert:

AUTHOR, Integer (user ID)

ELEMENTTYPEID, Integer

ALERTTYPE, Integer:

Value changed = 0

Value in range = 1

Value missing = 2

ALERTRANGEID, Integer

DELAYED, Boolean (0 = false, 1 = true)

ALERTDELAY, Integer

ALERTURL, String

RECIPIENTS. Returns a one-dimensional array of user and group IDs.

LASTALERTEDDATE, Date(double)

LASTALERTEDPERIODID, Integer

ElementID refers to a linked element:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

ELEMENTTYPEID, Integer

DESCRIPTION, String

AUTHOR, Integer

SCORECARDID, Integer

CREATEDDATE, Date(double)

MODIFIEDDATE, Date(double)

REFERENCEID, Integer

SOURCEMODELID, Integer

SOURCEOBJECTID, Integer

STATUS, Integer (0 = Draft, 1 = Proposal, 2 = Obsolete, 3 = Accepted)

ElementID refers to an element type:

NAME, String

SYMBOL, String. Listed only for backward compatibility, please use IDENTIFIER instead.

IDENTIFIER, String

DESCRIPTION, String

CREATEDDATE, Date(double)

MODIFIEDDATE, Date(double)

ROLES. Returns a two-dimensional array of roles defined for the element type. One line is returned per role, and the first line returned is the primary role corresponding to "In charge" user in earlier versions of QPR ScoreCard. The array has the following columns:

id, Integer. ID of the role

name, String. Name of the role.

description, String. Description of the role.

 

Note: In the case the ElementID points to a reference element, any property not visible for reference elements is taken from the original element instead. In the case of reference elements, the following properties are fetched from the reference element, i.e. not from the original element: order, level, index, parentelementid, referenceid, sourcemodelid, sourceobjectid, and scorecardid.

 

Required Rights:

 

At least view rights to the element

 

Return Values:

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

 

RV_SUCCESS

RV_APPLICATION_QUIT_CALLED

RV_NOT_CONNECTED_TO_SERVER

RV_NOT_AUTHENTICATED

RV_MODEL_NOT_OPEN

RV_PROPERTY_NOT_SUPPORTED

RV_NO_DATA

RV_ELEMENT_NOT_FOUND

RV_UNKNOWN_ERROR

 

Example Procedure:

 

iRet = SCModel.GetProperty(ElementId, "Name", Value) 'get name of element