# EsbGetFilter

Description

EsbGetFilter() starts getting the contents of a filter.

Syntax

    EsbGetFilter (hCtx, AppName, DbName, FltName, pItems)

    ByVal hCtx    As Long
    ByVal AppName As String
    ByVal DbName  As String
    ByVal FltName As String
          pItems  As Integer

Parameters

hCtx | Essbase VB API context handle
AppName | Application name
DbName | Database name
FltName | Filter name
pItems | Address of variable to receive Items of user application structures.

Return Value

If successful, returns the filter active flag in pActive, and the default filter access level in pAccess.

Notes

- This call must be followed by successive calls to EsbGetFilterRow() to fetch the rows for the filter.

Access

This function requires the caller to have Database Design privilege (ESB_PRIV_DBDESIGN) for the specified database.

Example

    Declare Function EsbGetFilter Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, ByVal FltName As String, Active As Integer, pAccess As Integer) As Long

    Sub ESB_GetFilter ()
       Dim sts As Long
       Dim AppName As String
       Dim DbName As String
       Dim FilterName As String
       Dim Active As Integer
       Dim pAccess As Integer
       Const szRow = 512
       Dim Row As String * szRow

       AppName = "Sample"
       DbName = "Basic"
       FilterName = "Filter"

       '***********
       ' Get Filter
       '***********
       sts = EsbGetFilter (hCtx, AppName, DbName, FilterName, Active,
        pAccess)

       '****************
       ' Get Filter Rows
       '****************
       sts = EsbGetFilterRow (hCtx, Row, szRow, pAccess)
         Do While Mid$(Row,1,1) <> chr$(0)
           sts = EsbGetFilterRow (hCtx, Row, szRow, pAccess)
       Loop
    End Sub

See Also

EsbGetFilterRow()
EsbListFilters()
EsbSetFilter()