EssOtlGetDimensionUserAttributes

Returns the user defined attributes used in the specified dimension.

Syntax

ESS_FUNC_M EssOtlGetDimensionUserAttributes (hOutline, pPredicate, 
                                             pCounts, ppAttributeNames);
ParameterData TypeDescription

hOutline

ESS_HOUTLINE_T

Essbase outline handle. This must have been returned from EssOtlOpenOutlineQuery().

pPredicate

ESS_PREDICATE_T

Structure defining the query. The fields of this structure are used as follows:

  • ulQuery—Value defining the operation to perform. The only valid value is ESS_DIMUSERATTRIBUTES.

  • pszDimension—Dimension to limit the scope of the query. Specify a valid dimension name.

pCounts

ESS_MBRCOUNTS_T

Structure defining information about counts It contains the following fields:

  • ulStart—Starting number to return

  • ulMaxCount—Maximum number of member names to return

  • ulTotalCount—Total number of members that are defined in the results of the query

  • pulReturnCount—Number of member names returned in this query

ppAttributeNames

ESS_PPMBRNAME_T

An array of attribute names returned from the query.

Notes

Return Value

The return value is zero if the function was successful.

Example

#include <essapi.h>
#include <essotl.h>

ESS_STS_T          sts = ESS_STS_NOERR; 
ESS_HOUTLINE_T     hOutline; 
ESS_OBJDEF_T       Object;
ESS_PREDICATE_T    Predicate;
ESS_MBRCOUNTS_T    Counts;   
ESS_MBRNAME_T      pAttribNames;
ESS_ULONG_T        i;
ESS_ACCESS_T       Access;
ESS_STR_T          AppName;
ESS_STR_T          DbName;

AppName = "Sample";
DbName = "Basic";

sts = EssSetActive(hCtx, AppName, DbName, &Access);

if ( sts == 0)
{
   memset(&Object, '\0', sizeof(Object));    

   sts = EssOtlOpenOutlineQuery(hCtx, &Object, &hOutline); 

   memset(&Predicate, '\0', sizeof(Predicate));  
   Predicate.ulQuery       = ESS_DIMUSERATTRIBUTES;
   Predicate.pszDimension  = "Market";

   memset(&Counts, '\0', sizeof(Counts));  
   Counts.ulStart    = 0;
   Counts.ulMaxCount = 10;

   if(!sts)
   {
     sts = EssOtlGetDimensionUserAttributes(hOutline, 
             &Predicate, &Counts, &pAttribNames);

     if (!sts && Counts.ulReturnCount)
     {
        sts = EssFree(hInstance, pAttribNames);
     }
   }
}

See Also