EssOtlGetAttributeAssocLevel

Gets the association level for an attribute or linked attribute dimension.

Every attribute has an association level and an attachment level associated with the attribute dimension definition. For a linked attribute dimension, the association level is always the shorter of the two periods in the periodic comparison represented by the linked attribute dimension. For example, in the linked attribute dimension Quarter by Year, Quarter is the association level, and Year is the attachment level.

Syntax

ESS_FUNC_M EssOtlGetAttributeAssocLevel (hOutline, hDimMember, psLevel);
ParameterData TypeDescription

hOutline

ESS_HOUTLINE_T

Outline context handle (input).

hDimMember

ESS_HMEMBER_T

Attribute or linked-attribute dimension member handle (input).

psLevel

ESS_PUSHORT_T

The attribute association level (output).

Notes

Return Value

Returns 0 if successful; otherwise, returns an error.

Example

#include <essapi.h>
#include <essotl.h>
 
ESS_STS_T          sts = 0;
ESS_OBJDEF_T       Object;
ESS_HOUTLINE_T     hOutline;
ESS_HMEMBER        hDimMember;
ESS_USHORT_T       usAssocLevel;
ESS_APPNAME_T      szAppName;
ESS_DBNAME_T       szDbName;
ESS_OBJNAME_T      szFileName;
 
memset(&Object, '\0', sizeof(Object));
Object.hCtx = hCtx;
Object.ObjType = ESS_OBJTYPE_OUTLINE;
strcpy(szAppName, "Sample");
strcpy(szDbName, "Basic");
strcpy(szFileName, "Basic");
Object.AppName = szAppName;
Object.DbName = szDbName;
Object.FileName = szFileName;
 
sts = EssOtlOpenOutline(hCtx, &Object, ESS_TRUE,
      ESS_TRUE, &hOutline);
 
if (!sts)
{
   sts = EssOtlFindMember(hOutline, "Quarter By Year",
         &hDimMember);
}
 
if (!sts  && hMemberJan)
{
   sts = EssOtlGetAttributeAssocLevel(hOutline,
         hDimMember, &usAssocLevel);

See Also