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

hCtxEssbase VB API context handle.
AppNameApplication name.
DbNameDatabase name.
FltNameFilter name (up to 30 characters long).
isActiveFilter active flag. If TRUE, the filter is set active, otherwise it is set inactive.
pAccessThe default filter access level.

Return Value

None.

Notes

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()