roleValue

Returns the value of the attribute that is associated with the role whose name is specified by "string" within the specified context. "Member" or "set_expression" is optional only in a number of limited circumstances, where it can be derived from another context. Applications can be made portable across different data sources and models by accessing attributes by role rather than by query item ID. For dimensionally-modeled relational (DMR) data sources, assignment of roles is the modeler's responsibility. Intrinsic roles that are defined for members of all data source types include: '_businessKey', '_memberCaption', '_memberDescription', '_memberUniqueName'. Additional roles can be defined in Framework Manager for each level in a hierarchy. For example, a Product type level may have an attribute column called "Type Shipping Container", and the Product level may have a "Product Shipping Container" attribute. Each of these could be assigned a custom role in Framework Manager called "Container". The property could then be referenced independently of the actual column name by using the roleValue function.

Syntax

roleValue ( string [ , member|set_expression ] )

Example 1

roleValue ( '_memberCaption' , [Sales].[Product].[Product].[Product 
line] -> [all].[1] )

Result

Camping Equipment

Example 2

roleValue ( '_businessKey' , [great_outdoors_company].[Years].[Years].
[Year] )

Result

Returns the value of the attribute that is associated with the business key role.

Result data

("2004-01-01","2004-12-31")
("2005-01-01","2005-12-31")
("2006-01-01","2006-12-31")

Example 3

roleValue ( '_memberUniqueName' , [great_outdoors_company].[Years].
[Years].[Year] )

Result

Returns the value of the attribute that is associated with the MUN role.

Result data

[great_outdoors_company].[Years].[Years].[Year] ->:[PC].[Years (
Root)].[20040101-20041231]
[great_outdoors_company].[Years].[Years].[Year] ->:[PC].[Years (
Root)].[20050101-20051231]
[great_outdoors_company].[Years].[Years].[Year] ->:[PC].[Years (
Root)].[20060101-20061231]