EssGetFilterList

Gets the list of users who are assigned a filter.

Syntax

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

hCtx

ESS_HCTX_T

API context handle.

AppName

ESS_STR_T

Application name.

DbName

ESS_STR_T

Database name.

FilterName

ESS_STR_T

Filter name.

pCount

ESS_PUSHORT_T

Address of variable to receive count of users assigned this filter.

ppUserList

ESS_PPUSERNAME_T

Address of pointer to receive allocated array of user names.

Notes

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

Return Value

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

Access

This function requires the caller to have database designer 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