xpfTestAttrBN

FUNCTION xpfTestAttrBN (instanceId    : GENERIC;
                        attributeName : STRING) 
                        isSet         : BOOLEAN;

The xpfTestAttrBN function returns TRUE if the specified attribute attributeName in the specified instance instanceId has a value, else the function returns FALSE. An attribute is assigned a value by a put function like xpxPutAttrBN, xpxPutAttrsBN etc.

Arguments


TypeNameComment
GENERICinstanceIdUnique id of an instance within the EDMdatabase
STRINGattributeNameThe name of an attribute of the given instance

Return Value


 

TypeNameComment
BOOLEANisSetTRUE if the attributeName has a value else FALSE

Options


 

Example


IF NOT xpfTestAttrBN(user,'password') THEN -- unsafe, mistype in attribute name can not be found in compile time
	user.password := default_password;
END_IF;
-- it is preferable to code the checking like this:
IF NOT EXISTS(user.password) THEN
	user.password := default_password;
END_IF;

 

See also

Filter by label

There are no items with the selected labels at this time.

Â