GetDescription

Gets the description of a dimension member. Since Financial Management supports multi-language descriptions of members, GetDescription takes an argument that specifies the language in which you want the description.

Syntax

<IHsvTreeInfo>.GetDescription(lItemID, lLanguageID, pbstrDesc)

Argument

Description

lItemID

Long (ByVal). The member ID of the member.

lLanguageID

Long (ByVal). The ID number of the language. You can get this ID with the EnumLanguages method of the HsvMetadata object.

pbstrDesc

String. Returns the description of the member.

Return Value

Integer. Indicates the success of the function call; returns 0 for success or -1 for an error.

Example

This example places the French description of an entity into a text box. The example assigns the label of the entity specified in the ComboEnts combo box to the sEnt variable. The example then uses EnumLanguages to find the language ID of the French language, and GetItemID to get the member ID of the entity assigned to sEnt. GetDescription is then called for this member, and the description is placed in the txtEntDesc text box.

Dim cIHsvTreeInfo as IHsvTreeInfo, lMemID As Long
Dim sEnt As String, lLangID As Long, sDesc As String
Dim vaIDs, vaLabels, iLBounds As Integer, iLanguages As Integer
sEnt = comboEnts.Text
m_cMetadata.EnumLanguages vaIDs, vaLabels
iLBounds = LBound(vaLabels)
iLanguages = UBound(vaLabels)
Do Until iLBounds > iLanguages
  If vaLabels(iLBounds) = "French" Then
    lLangID = vaIDs(iLBounds)
  End If
iLBounds = iLBounds + 1
Loop
Set cIHsvTreeInfo = m_cMetadata.Entities
lMemID = cIHsvTreeInfo.GetItemID(sEnt)
cIHsvTreeInfo.GetDescription lMemID, lLangID, sDesc
txtEntDesc.Text = sDesc