# EssGetFilterList

Description

EssGetFilterList() gets the list of users who are assigned a filter.

Syntax

    ESS_FUNC_M EssGetFilterList (hCtx, AppName, DbName, FilterName, pCount, ppUserList);

ESS_HCTX_T | hCtx
ESS_STR_T | AppName
ESS_STR_T | DbName
ESS_STR_T | FilterName
ESS_PUSHORT_T | pCount
ESS_PPUSERNAME_T | ppUserList

Parameters

hCtx | Essbase API context handle.
AppName | Application name.
DbName | Database name.
FilterName | Filter name.
pCount | Address of variable to receive count of users assigned this filter.
ppUserList | Address of pointer to receive allocated array of user names.

Return Value

If successful, returns a count of the users assigned this filter in pCount, and an array of user names in ppUserList.

Notes

- The memory allocated for ppUserList should be freed using EssFree().

Access

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

Example

    ESS_STS_T
    ESS_GetFilterList (ESS_HCTX_T  hCtx, ESS_HINST_T hInst)
    {
       ESS_STS_T       sts = ESS_STS_NOERR;
       ESS_STR_T       AppName;
       ESS_STR_T       DbName;
       ESS_STR_T       FilterName;
       ESS_USHORT_T    Count = 0;
       ESS_USHORT_T    ind;
       ESS_PUSERNAME_T UserList = NULL;

       AppName    = "Sample";
       DbName     = "Basic";
       FilterName = "NewFilter";

       sts = EssGetFilterList(hCtx, AppName, DbName,
             FilterName, &Count, &UserList);
       if(!sts)
       {
    printf("--------%s User List---------\r\n\r\n",
                    FilterName);
          if(Count && UserList)
          {
             for (ind = 0; ind < Count; ind++)
                printf("%s\r\n",UserList[ind]);
             EssFree(hInst, UserList);
          }
          printf("\r\n");
       }
       return (sts);
    }

See Also

EssGetFilter()
EssListFilters()
EssSetFilterList()