# EsbSetFilter

Description

EsbSetFilter() starts setting the contents of a filter.

Syntax

    EsbSetFilter (hCtx, AppName, DbName, FltName, isActive, pAccess)

    ByVal hCtx     As Long
    ByVal AppName  As String
    ByVal DbName   As String
    ByVal FltName  As String
    ByVal isActive As Integer
    ByVal pAccess  As Integer

Parameters

hCtx | Essbase VB API context handle.
AppName | Application name.
DbName | Database name.
FltName | Filter name (up to 30 characters long).
isActive | Filter active flag. If TRUE, the filter is set active, otherwise it is set inactive.
pAccess | The default filter access level.

Return Value

None.

Notes

- If the filter does not already exist, it will first be created by this call.
- This call must be followed by successive calls to EsbSetFilterRow() to set all 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 EsbSetFilter Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, ByVal FltName As String, ByVal is Active As Integer, ByVal pAccess As Integer) As LongSub ESB_SetFilter()
       Dim sts As Long
       Dim AppName As String
       Dim DbName As String
       Dim FilterName As String
       Dim Active As Integer
       Dim pAccess As Integer
       Dim Row As String AppName = "Demo"
       DbName = "Basic"
       FilterName = "Filter"
       Active = ESB_YES
       pAccess = ESB_ACCESS_DBCREATE '***********
       ' Set Filter
       '***********
       sts = EsbSetFilter(hCtx, AppName, DbName,
       FilterName, Active, pAccess)
       pAccess = ESB_ACCESS_READ
       Row = "@IDESCENDANTS(Scenario)"
       sts = EsbSetFilterRow(hCtx, Row, pAccess)
       pAccess = ESB_ACCESS_WRITE
       Row = "@IDESCENDANTS(Scenario), East"
       sts = EsbSetFilterRow(hCtx, Row, pAccess)
       sts = EsbSetFilterRow(hCtx, ByVal 0&, pAccess)
    End Sub

See Also

EsbGetFilter()
EsbListFilters()
EsbSetFilterRow()