# EssOtlDeleteUserAttribute

Description

EssOtlDeleteUserAttribute() deletes a user-defined attribute of a member.

Syntax

    ESS_FUNC_M EssOtlDeleteUserAttribute (hOutline, hMember, pszString);

ESS_HOUTLINE_T | hOutline
ESS_HMEMBER_T | hMember
ESS_STR_T | pszString

Parameters

hOutline | Outline context handle
hMember | Handle of member that contains the attribute you are deleting
pszString | User attribute string.

Return Value

Returns 0 if successful; otherwise:

OTLAPI_NO_USERATTR.

Notes

- The caller passes in a string to identify the attribute.

Example

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

    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_STR_T          AttributeList;

    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);

    /********  Delete User Attributes *********/

    AttributeList = "Read Write";

    if (!sts)
    {
       sts = EssOtlFindMember(hOutline, "Jan",
             &hMember);
    }

    if (!sts && hMember)
    {
       sts = EssOtlDeleteUserAttribute(hOutline,
             hMember, AttributeList);
    }

See Also

EssOtlGetUserAttributes()
EssOtlSetUserAttribute()