# EsbOtlGetUserAttributes

Description

EsbOtlGetUserAttributes() retrieves all user-defined attributes for a member.

Syntax

    EsbOtlGetUserAttributes (hOutline, hMember, pusCount)

    ByVal hOutline As Long
    ByVal hMember  As Long
          pusCount As Integer

Parameters

hOutline | Outline context handle.
hMember | Handle of member for which to get the user-defined attribute.
pusCount | Count of user attributes returned; defines the number of elements in the ppAttributeList array.

Return Value

Returns 0 if successful.

Notes

- Call EsbGetNextItem() once for each user-defined attribute (*pusCount attributes).
- A caller can set any number of user-defined attributes for a member using EsbOtlSetUserAttribute(). Each attribute is defined as a unique string that follows the same conventions as member names.
- A user attribute can be the same as any member name, alias, or generation or level name.

Example

    Declare Function EsbOtlGetUserAttributes Lib
    "ESBOTLW" (ByVal hOutline As Long, ByVal hMember As Long,
    pusCount As Integer) As Long

    Sub ESB_OtlGetUserAttributes()
    Dim sts As Long
    Dim Object As ESB_OBJDEF_T
    Dim hOutline As Long
    Dim hMember As Long
    Dim AttributeList As String * ESB_MBRNAMELEN
    Dim n As Integer
    Dim Count As Integer

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

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

    If sts = 0 Then
       sts = EsbOtlFindMember(hOutline, "Jan",
        hMember)
    End If

    If sts = 0 And hMember <> 0 Then
       '********************
       ' Get User Attributes
       '********************
       sts = EsbOtlGetUserAttributes(hOutline,
        hMember, Count)
    End If

    If sts = 0 And Count <> 0 Then
       For n = 1 To Count
       '********************************
       ' Get next User Attribute String
       ' from the list
       '********************************
       sts = EsbGetNextItem(hCtx,
        ESB_OTLUSERATTR_TYPE, ByVal AttributeList)
        Next
    End If
    End Sub

See Also

EsbOtlDeleteUserAttribute()
EsbOtlSetUserAttribute()