EssOtlGetOriginalMember

Returns the original member name of a shared or extended shared member. If the member is not shared, the return value is NULL. This function returns the fully qualified original member name.

Syntax

ESS_FUNC_M EssOtlGetOriginalMember (hOutline, hMember, ppOriMember);
ParameterData TypeDescription

hOutline

ESS_HOUTLINE_T

Outline context handle (input).

hMember

ESS_HMEMBER_T

Member name (input).

ppOriMember

ESS_PSTR_T

The original member name (output).

Notes

Return Value

Returns 0 if successful; otherwise, returns an error.

Example

The "original member" returned for the Sample Basic shared member 100-10 is [100].[100-20].

ESS_FUNC_M ESS_GetOrigMember()
{
 
 ESS_STS_T    sts = 0;
 ESS_HOUTLINE_T   hOutline;
 ESS_OBJDEF_T   Object;
 ESS_APPNAME_T   szAppName;
 ESS_DBNAME_T   szDbName;
 ESS_OBJNAME_T   szFileName; 
 ESS_HMEMBER_T   hMember = ESS_NULL, ChildMember = ESS_NULL;
 ESS_STR_T    OriMember;
 
 
 
 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);
 
// sts = EssOtlOpenOutlineQuery (hCtx, &Object, &hOutline);
 
 if (!sts)
 {
  sts = EssOtlFindMember(hOutline, "Diet", &hMember);
 }
 
 //Get member handle for shared member "100-10"
 if (!sts && hMember)
 {
  sts = EssOtlGetChild(hOutline, hMember, &ChildMember);
 }
 

  if (!sts && ChildMember)
  {
   sts = EssOtlGetOriginalMember (hOutline, ChildMember, &OriMember);
   printf("Original member for shared member \"100-10\" is: %s", OriMember);
  }
 
 return sts;
}

See Also

  • EssOtlSetOriginalMember