getDefaultAttrValue()

Retrieves the default value of a business object attribute, given the attribute's name or its position in the business object's attribute list.

Syntax

char * getDefaultAttrValue(char * attrName);
 char * getDefaultAttrValue(int position);
 

Parameters

name [in]
Is the name of an attribute whose default value is retrieved.
position [in]
Is an integer that specifies the ordinal position of an attribute in the business object's attribute list.

Return values

The default value of the specified attribute, in the format defined for the attribute's data type. The methods will return NULL in the following cases:

Notes

To retrieve the default value of an attribute of the business object, you can specify the attribute name or its position in the list of attributes. If you pass an empty string or NULL as a parameter, the getDefaultAttrValue() method returns the "ignore value" 0 (zero).

An attribute can have a special default value, either blank or "ignore". Blank means "clear this field; there is no data in it." Ignore means "I don't know or don't care what is in this field."

Examples

tempStr = pObj->getDefaultAttrValue(i);
 

See also

getAttrValue() setDefaultAttrValues()

Copyright IBM Corp. 1997, 2003