Sets the list of calc scripts objects which are accessible to a user.
Syntax
ESS_FUNC_M EssSetCalcList (hCtx, UserName, AppName, DbName, AllCalcs, Count, pCalcList);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle |
UserName | ESS_STR_T | User name |
AppName | ESS_STR_T | Application name |
DbName | ESS_STR_T | Database name. If NULL, uses Application subdirectory |
AllCalcs | ESS_BOOL_T | Allow all calcs flag. If TRUE, the user can access all calc scripts, otherwise, they can only access those specified in the CalcList argument. |
Count | ESS_USHORT_T | Count of the number of accessible calc script objects |
pCalcList | ESS_POBJNAME_T | Pointer to an array of calc script object names |
Notes
If the AllCalcs flag is set to TRUE, the Count and pCalcList arguments will be ignored.
In order to access any calc script objects, the user must have at least calculate access to the appropriate database.
Return Value
None.
Access
This function requires the caller to have database Design privilege (ESS_PRIV_DBDESIGN) for the specified database.
Example
ESS_FUNC_M ESS_SetCalcList (ESS_HCTX_T hCtx) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_STR_T UserName; ESS_STR_T AppName; ESS_STR_T DbName; ESS_BOOL_T AllCalcs; ESS_USHORT_T Count; ESS_OBJNAME_T pCalcList[3]; UserName = "Newuser"; AppName = "Sample"; DbName = "Basic"; AllCalcs = ESS_FALSE ; Count = 3; strcpy(pCalcList[0],"test1"); strcpy(pCalcList[1],"test2"); strcpy(pCalcList[2],"test3"); sts = EssSetCalcList(hCtx, UserName, AppName, DbName, AllCalcs, Count, pCalcList); return (sts); }
See Also