Revision history:
Introduced in QPR 7.2.1
Last changed in QPR 2025.1
Get value of an object's property. PropertyName is not case sensitive.
Synopsis:
SCModel.GetProperty(ObjectId, PropertyName, out Result)
Parameters:
ObjectId: 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:
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)).
LOCKDATEOFFSET, Integer. Offset in days for automatic locking after the end of period.
ISLOCKDATEOFFSETENABLED, Boolean. The automatic locking offset enabled/disabled status.
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 period:
LOCKED, Boolean. The locked/unlocked status of the period.
CUSTOMFIELD, String. Content of the period'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 period's own custom text field; PARENT, searches also the period level if no match found from the period.
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 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.
Note: In the case the ObjectId 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 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_PROPERTY_NOT_SUPPORTED
RV_NO_DATA
RV_ELEMENT_NOT_FOUND
RV_UNKNOWN_ERROR
Example Procedure:
iRet = SCModel.GetProperty(ObjectId, "Name", Value) 'get name of element