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);
Parameter | Data Type | Description |
---|---|---|
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
This function works in both edit and query modes.
If you use this function on an outline in which all member names are unique, it will have no effect.
In an outline that allows duplicate member names, if the member handle passed in is an extended shared member or a regular shared member, this function returns its original member as a path expression.
Given the following hierarchy, if you pass to this function the member handle corresponding to [Diet].[100-10], it returns [200].[100-10].
100 100-10 200 100-10 (duplicate) Diet 100-10 (shared with [200.100-10])
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