Returns a String representation of a dimension member’s attribute. However, in cases where the attribute value is itself a dimension member, the member ID of the attribute value is returned instead of the member’s label.
<IHsvTreeInfo>.TranslateAttributeValueForDisplay sAttrib, vValue, bstrValue, plDimID
Integer (ByVal). The ID of the attribute. These IDs are represented by the following groups of constants in the HFMConstants type library: | |
Variant (ByVal). The attribute value to be converted to a String representation. For example, to get the String representation of an account type, you can pass the numeric value returned by HsvAccounts.GetAccountType. | |
String. Returns one of the following values:
| |
Long. Returns one of the following values:
|
The following function takes an account name and returns the String representation of the account’s type.
Function getAccountTypeString(sLabel As String) As String Dim cAccounts As HsvAccounts, cTreeInfo As IHsvTreeInfo Dim lAcctId As Long, iType As Integer, sVal As String Dim lRetId As Long Set cAccounts = m_cMetadata.Accounts Set cTreeInfo = m_cMetadata.Accounts lAcctId = cTreeInfo.GetItemID(sLabel) cAccounts.GetAccountType lAcctId, iType cTreeInfo.TranslateAttributeValueForDisplay _ ATTRIB_ACCOUNT_TYPE, iType, sVal, lRetId getAccountTypeString = sVal End Function