# EsbGetNextItem

Description

EsbGetNextItem() retrieves next item from an array or list generated by calling other VB API functions.

Syntax

    EsbGetNextItem (hCtx, dType, pItem)

    ByVal hCtx  As Long
    ByVal dType As Integer
          pItem As Any

Parameters

hCtx | Essbase VB API context handle.
dType | Type of the array/list to retrieve item from: ESB_xxx...xx_TYPE, where xxx...xx is the name of a global constant,such as ESB_USERINFO_T .
pItem | Buffer to receive the next item.

Return Value

If successful, returns an item in pItem. Returns -1 on failure to indicate a wrong Type or 1 to indicate that there are no more items in the list.

Notes

- This function retrieves items from the list/array and must be called in a FOR loop based on the number of items returned by the VB API function that generates the array/list.
- pItem is a buffer of a necessary data type.

Access

This function requires no special privileges.

Example

    Declare Function EsbGetNextItem Lib "ESBAPIW" (ByVal hCtx As Long, ByVal dType
    As Integer, pItem As Any)

    Sub ESB_GetNextItem ()
       Dim Items As Integer
       Dim AppName As String
       Dim DbName As String
       Dim FilterName As String
       Dim User As String * ESB_USERNAMELEN
       Dim sts As Long

       AppName = "Demo"
       DbName = "Basic"
       FilterName = "Filter"

       '****************
       ' Get Filter List
       '****************
       sts = EsbGetFilterList (hCtx, AppName, DbName,
       FilterName, Items)

       '*************************
       ' Print out all user names
       ' from the list
       '*************************
       For n = 1 To Items

         '**************************
         ' Get next User Name String
         ' from the list
         '**************************

         sts = EsbGetNextItem (hCtx,
               ESB_USERINFO_TYPE, Userinfo)
               Print User
       Next
    End Sub

Global Constants for EsbGetNextItem

ESB_USERINFO_TYPE = 1 | ESB_USERINFO_T (EsbListUsers)
ESB_GROUPINFO_TYPE = 2 | ESB_USERINFO_T (EsbListGroups)
ESB_USERAPP_TYPE = 3 | ESB_USERAPP_T (EsbGetApplicationAccess)
ESB_USERDB_TYPE = 4 | ESB_USERDB_T (EsbGetDatabaseAccess)
ESB_LOCKINFO_TYPE = 5 | ESB_LOCKINFO_T (EsbListLocks)
ESB_OBJINFO_TYPE = 6 | ESB_OBJINFO_T (EsbListObjects)
ESB_APPDB_TYPE = 7 | ESB_APPDB_T (EsbListDatabases)
ESB_CAPPDB_TYPE = 8 | ESB_APPDB_T (EsbListCurrencyDatabase)
ESB_APPNAME_TYPE = 9 | ByVal var As String * ESB_APPNAMELEN (EsbListApplications)
ESB_DBNAME_TYPE = 10 | ByVal var As String * ESB_DBNAMELEN (EsbGetApplicationInfo)
ESB_GROUPNAME_TYPE = 11 | ByVal var As String * ESB_USERNAMELEN (EsbGetGroupList)
ESB_FTRNAME_TYPE = 12 | ByVal var As String * ESB_FTRNAMELEN (EsbListFilters)
ESB_FUSERNAME_TYPE = 13 | ByVal var As String * ESB_USERNAMELEN (EsbGetFilterList)
ESB_OBJNAME_TYPE = 14 | ByVal var As String * ESB_OBJNAMELEN (EsbGetCalcList)
ESB_DIMSTATS_TYPE = 15 | ESB_DIMSTATS_T (EsbGetDatabaseStats)
ESB_CUSERINFO_TYPE = 16 | ESB_USERINFO_T (EsbListConnections)
ESB_LAPPDB_TYPE = 17 | ESB_APPDB_T (EsbLogin)
ESB_ALIASNAME_TYPE = 18 | ESB_ALIASNAME_T (EsbListAliases)
ESB_MBRALT_TYPE = 19 | ESB_MBRALT_T (EsbDisplayAlias)
ESB_RATEINFO_TYPE = 20 | ESB_RATEINFO_T (EsbGetCurrencyRateInfo)
ESB_OUTLINEINFO_TYPE = 21 | ByVal var As String * ESB_ALIASNAMELEN (EsbOtlGetOutlineInfo)
ESB_OUTERROR_TYPE = 22 | ESB_OUTERROR_T (EsbOtlVerifyOutline)
ESB_OTLUSERATTR_TYPE = 23 | ByVal var As String * ESB_MBRNAMELEN (EsbOtlGetUserAttributes)
ESB_APPINFOEX_TYPE = 24 | ESB_APPINFOEX_T (EsbGetApplicationInfoEx)
ESB_DBREQINFO_TYPE = 25 | ESB_DBREQINFO_T (EsbGetDatabaseInfo)
ESB_DIMINFO_TYPE = 26 | ESB_DIMENSIONINFO_T (EsbGetDimensionInfo)
ESB_HMEMBER_TYPE = 27 | ESB_HMEMBER_T (EsbOtlQueryMembers)
ESB_GENLEVELNAME_TYPE = 28 | ESB_GENLEVELNAME_T (EsbOtlGetGenNames)
ESB_VARIABLE_TYPE = 29 | ESB_VARIABLE_T (EsbListVariables)
ESB_LRO_TYPE = 30 | ESB_LRODESC_T
ESB_PART_INFO_TYPE = 31 | ESB_PART_INFO_T
ESB_DTS_TYPE = 32 | ESB_DTSMBRINFO_T (EsbGetEnabledDTSMembers)
ESB_MBRNAME_TYPE = 33 | ESB_MBRNAME_T (EsbOtlGetDimensionUserAttributes)

See Also

EsbListUsers()
EsbListGroups()
EsbGetAplicationAccess()
EsbGetDatabaseAccess()
EsbListLocks()
EsbListObjects()
EsbListDatabases()
EsbListCurrencyDatabases()
EsbListApplications()
EsbGetApplicationInfo()
EsbGetApplicationInfoEx()
EsbGetGroupList()
EsbListFilters()
EsbGetFilterList()
EsbGetCalcList()
EsbGetDatabaseState()
EsbGetDatabaseStats()
EsbListConnections()
EsbLogin()
EsbListAliases()
EsbDisplayAlias()
EsbGetCurrencyRateInfo()
EsbLROGetMemberCombo()
EsbOtlQueryMembersByName()