Please enable JavaScript to view this site.

QPR Knowledge Base 2025.1

Navigation: Developer's Guide > QPR API > The Object Model > QPR Metrics > SCModel Commands

GetPropertiesEx

Scroll Prev Top Next More

Revision history:

Introduced in QPR 7.6.1 SP2

Last changed in QPR 2025.1

 

Returns a two-dimensional array containing multiple properties of multiple model elements and/or QPR Metrics model objects. SCModel.GetPropertiesEx supports getting all properties of all element and object types that are supported by the SCModel.GetProperty command.

 

Synopsis:

 

SCModel.GetPropertiesEx(ObjectIds, PropertyNames, out Properties)

 

Parameters:

 

ObjectIds: Array. An array of elements and or objects whose properties are queried. For instance the array returned by SCModel.Find can be used without modifications.

PropertyNames: String. A comma-separated list of property names. Note that the actual selection of available properties depends on the types of object. The possible properties for the PropertyNames parameter are as follows:

ObjectId 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

customattributes

CUSTOMFIELD, String. Content of the scorecard's custom text field.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", inheritfrom=""<inheritfrom>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned. If inheritfrom is: omitted, searches only the scorecard's own custom text field; PARENT, searches also the parent scorecard if no match found from the specified scorecard; PARENTHIERARCHY, searches also all ancestor scorecards, if no match found from the specified scorecard, starting from the immediate parent scorecard and moving up the hierarchy.

CUSTOMATTRIBUTEFOUNDFROMOBJECT jsonpath=""<JSONPath>"", inheritfrom=""<inheritfrom>"", String. Works otherwise similarly as CUSTOMATTRIBUTE, but instead of the value ifself, returns the id of the object from which the value was found. Useful together with inheritfrom to find out which object had the value returned by CUSTOMATTRIBUTE.

ObjectId refers to an element:

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.

CUSTOMFIELD, String. Content of the element's custom text field.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", inheritfrom=""<inheritfrom>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned. If inheritfrom is: omitted, searches only the element's own custom text field; PARENT, searches also the parent element if no match found from the specified element; PARENTHIERARCHY, searches also all ancestor elements, if no match found from the specified element, starting from the immediate parent element and moving up the hierarchy; SCORECARD, searches also the scorecard if no match found from the element; SCORECARDHIERARCHY, searches also the scorecard and all ancestor scorecards, moving up the scorecard hierarchy; COMBINEDHIERARCHY, proceeds first according to PARENTHIERARCHY and then according to SCORECARDHIERARCHY; ELEMENTYPE; VALUESETTING; PERIODLEVEL; GRAPHLAYOUTTEMPLATE; MEASUREUNIT, searches also the element's element type, value setting, period level, graph layout template or measure unit if no match found from the element.

CUSTOMATTRIBUTEFOUNDFROMOBJECT jsonpath=""<JSONPath>"", inheritfrom=""<inheritfrom>"", String. Works otherwise similarly as CUSTOMATTRIBUTE, but instead of the value ifself, returns the id of the object from which the value was found. Useful together with inheritfrom to find out which object had the value returned by CUSTOMATTRIBUTE.

ObjectId 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)).

CUSTOMFIELD, String. Content of the period level's custom text field.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned.

ObjectId 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

CUSTOMFIELD, String. Content of the range's custom text field.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", inheritfrom=""<inheritfrom>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned. If inheritfrom is: omitted, searches only the range's own custom text field; PARENT, searches also the value setting, if no match found from the specified range.

CUSTOMATTRIBUTEFOUNDFROMOBJECT jsonpath=""<JSONPath>"", inheritfrom=""<inheritfrom>"", String. Works otherwise similarly as CUSTOMATTRIBUTE, but instead of the value ifself, returns the id of the object from which the value was found. Useful together with inheritfrom to find out which object had the value returned by CUSTOMATTRIBUTE.

ObjectId 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

CUSTOMFIELD, String. Content of the chart template's custom text field.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned.

ObjectId 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

CUSTOMFIELD, String. Content of the custom text field of the series.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", inheritfrom=""<inheritfrom>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned. If inheritfrom is: omitted, searches only the custom text field of the series; PARENT, searches also the value settings if no match found from the series.

CUSTOMATTRIBUTEFOUNDFROMOBJECT jsonpath=""<JSONPath>"", inheritfrom=""<inheritfrom>"", String. Works otherwise similarly as CUSTOMATTRIBUTE, but instead of the value ifself, returns the id of the object from which the value was found. Useful together with inheritfrom to find out which object had the value returned by CUSTOMATTRIBUTE.

ObjectId 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).

CUSTOMFIELD, String. Content of the value setting's custom text field.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned.

ObjectId 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

CUSTOMFIELD, String. Content of the information item's custom text field.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned.

ObjectId 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)

CUSTOMFIELD, String. Content of the unit's custom text field.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned.

ObjectId 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

ObjectId 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)

CUSTOMFIELD, String. Content of the linked element's custom text field.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned.

ObjectId 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.

CUSTOMFIELD, String. Content of the element type's custom text field.

CUSTOMATTRIBUTE jsonpath=""<JSONPath>"", String. If the custom text field contains valid JSON that has a value at the given JSONPath, that value is returned.

 

out Properties: Two-dimensional variant array for storing the returned properties. Note that some properties may be arrays themselves.

 

Required Rights:

 

At least view rights to the object and, in case inheritfrom is used with CUSTOMATTRIBUTE or CUSTOMATTRIBUTEFOUNDFROMOBJECT, to all objects that need to be traversed until a matching JSONPath is found.

 

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_ELEMENT_NOT_FOUND

RV_PROPERTY_NOT_SUPPORTED

RV_NO_DATA

RV_UNKNOWN_ERROR

 

Example Procedure:

Names = "name,SYMBOL,DESCRIPTION" iResult = SCModel.GetPropertiesEx(Ids, Names, Results)