InsertItem method: Attribute collection

Syntax

InsertItem(AttributeValueName)

Description

The InsertItem method inserts the AttributeValue object identified by AttributeValueName from the Attribute Collection.

This method is not executed automatically. It is executed only when the parent object is saved.

Parameters

Parameter Description

AttributeValueName

Specify the name of an AttributeValue existing in the Attribute Collection.

Returns

A reference to the new AttributeValue object if the method executed successfully, NULL otherwise.

Example

For &I = 1 To &Rowset.ActiveRowCount
    If &CompName = "PORTAL_CREF_ADM" Then
       &Record = &Rowset.GetRow(&I).GetRecord(Record.PORTAL_CATR_DV);
    Else
       &Record = &Rowset.GetRow(&I).GetRecord(Record.PORTAL_FATR_DV);
    End-If;

    If &Record.PORTAL_ATTR_NAM.Value <> "" Then
       &Attr = &AttrColl.InsertItem(&Record.PORTAL_ATTR_NAM.Value);
       &Attr.Value = &Record.PORTAL_ATTR_VAL.Value;
    End-If;
End-For;