Sets the list of groups or users that are assigned to a filter. The count parameter controls the number of groups or users assigned to the filter. A count of zero will remove all the groups or users from the list.
Similar to EssSetFilterList, but includes users and groups hosted in a user directory.
Syntax
ESS_FUNC_M EssSetFilterListEx (hCtx, AppName, DbName, FilterName, bIsIdentity, entityType, Count, UserList);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle (input). |
AppName | ESS_STR_T | Application name (input). |
DbName | ESS_STR_T | Database name (input). |
FilterName | ESS_STR_T | Filter name (input). |
bIsIdentity | ESS_BOOL_T | Input. Indicates whether userList contains names or identities. If TRUE, userList contains identities. The list can contain names or identities, but not both. |
entityType | ESS_USHORT_T | Type of entity contained in userList (input). Can be one of the following:
The list can contain users or groups, but not both. |
Count | ESS_USHORT_T | Count of entities contained in userList (input). |
UserList | ESS_PSTR_T | Array of user or group names or identities (input). |
Return Value
None.
Access
This function requires the caller to have database Design privilege (ESS_PRIV_DBDESIGN) for the specified database.
Example
void GetFilterList() { ESS_STS_T sts = ESS_STS_NOERR; ESS_STR_T FilterName; ESS_USHORT_T Count = 0; ESS_USHORT_T ind; ESS_PUSERNAME_T UserList = NULL; FilterName = "Filter1"; sts = EssGetFilterList(hCtx, AppName, DbName, FilterName, &Count, &UserList); printf("EssGetFilterList sts: %ld\n", sts); if(!sts) { printf("--------%s User List---------\n", FilterName); if(Count && UserList) { for (ind = 0; ind < Count; ind++) printf("%s\n",UserList[ind]); EssFree(hInst, UserList); } else printf("none."); printf("\n"); } } ESS_FUNC_M ESS_SetFilterListEx (ESS_HCTX_T hCtx) { ESS_STS_T sts = ESS_STS_NOERR; ESS_STR_T FilterName; ESS_USHORT_T Count = 0; //ESS_USERNAME_T UserList[2]; ESS_STR_T UserList[2]; ESS_BOOL_T bIsIdentity; ESS_USHORT_T type; FilterName = "Filter1"; UserList[0] = "IDUser9@ldap"; UserList[1] = "IDUser10@ldap"; Count = 2; bIsIdentity = ESS_TRUE; type = ESS_TYPE_USER; sts = EssSetFilterListEx(hCtx, AppName, DbName, FilterName, bIsIdentity, type, Count, UserList); printf("EssSetFilterListEx sts: %ld\n", sts); if(!sts) GetFilterList(); return (sts); }
See Also