# EsbOtlSetMemberAlias

Description

EsbOtlSetMemberAlias() sets the default member alias for a specified member in a specified alias table.

Syntax

    EsbOtlSetMemberAlias (hOutline, hMember, pszAliasTable, pszAlias)

    ByVal hOutline      As Long
    ByVal hMember       As Long
    ByVal pszAliasTable As String
    ByVal pszAlias      As String

Parameters

hOutline | Outline context handle.
hMember | Handle of member to set the alias for.
pszAliasTable | Alias table to set the alias for. If this parameter is "", the default alias table is used.
pszAlias | Alias.

Return Value

Returns 0 if successful; otherwise one of the following:

OTLAPI_BAD_ALIASTABLE
OTLAPI_ERR_ALIASSHARED
OTLAPI_ERR_ILLEGALDEFALIAS
OTLAPI_ERR_ILLEGALCOMBOALIAS
OTLAPI_ERR_ILLEGALALIASSTRING
OTLAPI_ERR_DUPLICATEALIAS

Notes

- The member handle cannot be a shared member. No aliases are allowed for shared members.
- Use EsbOtlDeleteMemberAlias() to remove an alias.

Example

    Declare Function EsbOtlSetMemberAlias Lib
    "ESBOTLW" (ByVal hOutline As Long, ByVal hMember As Long,
    ByVal pszAliasTable As String, ByVal pszAlias As String) As Long

    Sub ESB_OtlSetMemberAlias()
    Dim sts As Long
    Dim Object As ESB_OBJDEF_T
    Dim hOutline As Long
    Dim hMemberYear As Long
    Dim szAlias As String * ESB_MBRNAMELEN

    Object.hCtx = hCtx
    Object.Type = ESB_OBJTYPE_OUTLINE
    Object.AppName = "Sample"
    Object.DbName = "Basic"
    Object.FileName = "Basic"

    sts = EsbOtlOpenOutline(hCtx, Object,
    SB_YES, ESB_YES, hOutline)

    If sts = 0 Then
       sts = EsbOtlFindMember(hOutline, "Year",
        hMemberYear)
    End If

    If sts = 0 And hMemberYear <> 0 Then
       szAlias = "Year Dimension"
       sts = EsbOtlSetMemberAlias(hOutline,
        hMemberYear, "", szAlias)
    End If
    End Sub

See Also

EsbOtlGetMemberAlias()
EsbOtlDeleteMemberAlias()