# EssOtlFindAttributeMembers

Description

EssOtlFindAttributeMembers() returns all attribute members having the specified short name.

Syntax

ESS_FUNC_M EssOtlFindAttributeMembers (hOutline, pszMember, pszDimName, pusCount, pphMembers);

ESS_HOUTLINE_T | hOutline;
ESS_STR_T | pszMember;
ESS_STR_T | pszDimName;
ESS_PUSHORT_T | pusCount;
ESS_PPHMEMBER_T | pphMembers;

Parameters

hOutline | Handle to the outline
pszMember | Attribute short name
pszDimName | Attribute dimension name (optional)
pusCount | Number of base members returned
pphMembers | Pointer to an array of base member handles

Return Value

Notes

- pszMember must be a short name.
- pszDimName is optional. You may enter NULL.

Access

Example

    void  ESS_OtlFindAttributeMembers()
    {
       ESS_STS_T        sts = ESS_STS_NOERR;
       ESS_SHORT_T      index;
       ESS_USHORT_T     count;
       ESS_OBJDEF_T     Object;
       ESS_APPNAME_T    szAppName;
       ESS_DBNAME_T     szDbName;
       ESS_OBJNAME_T    szFileName;
       ESS_HOUTLINE_T   hOutline;
       ESS_PPHMEMBER_T  phMember;
       ESS_PPMBRINFO_T  phMemberInfo;
       ESS_MBRNAME_T    mbrName;

       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);
       printf("EssOtlOpenOutline() sts: %ld\n",sts);

       /* Returning an array of member handles? */
       sts = EssOtlFindAttributeMembers(hOutline,"12", "", &count, &phMember);
       /* sts = EssOtlFindAttributeMembers(hOutline,"10-01-1996", "", &count, &phMember); */
       printf("EssOtlFindAttributeMembers() sts: %ld\n",sts);
       /* Allocate memory for an array of memberinfo struct handles */
       sts = EssAlloc(hInst,count * (sizeof(ESS_HMEMBER_T)), (ESS_PPVOID_T)&phMemberInfo);
       if (!sts)
       {
          for(index = 0; index < count; index++)
          {
             /* Step through array of member handles, and assign member */
             sts = EssOtlGetMemberInfo(hOutline,phMember[index],&phMemberInfo[index]);
             printf("EssOtlGetMemberInfo() sts: %ld\n",sts);
             strcpy(mbrName,phMemberInfo[index]->szMember);
             printf("Attribute member name #%d is: %s\n",(index + 1),mbrName);
          }
          EssFree(hInst, phMember);
          EssFree(hInst, phMemberInfo);
       }
    }

See Also

EssCheckAttributes()
EssFreeStructure()
EssGetAssociatedAttributesInfo()
EssGetAttributeInfo()
EssGetAttributeSpecifications()
EssOtlAssociateAttributeDimension()
EssOtlAssociateAttributeMember()
EssOtlDisassociateAttributeDimension()
EssOtlDisassociateAttributeMember()
EssOtlFreeStructure()
EssOtlGetAssociatedAttributes()
EssOtlGetAttributeInfo()
EssOtlGetAttributeSpecifications()
EssOtlQueryAttributes()
EssOtlSetAttributeSpecifications()