Add Method

Applies To   See Also  

Use this property to add a new property to the collection.

Syntax
Function Add(
    PropertyName As String,
    [Value],
    [Flags As CePropFlags = cePropFlagNone]) As Property Object
Parameters

PropertyName

The name of the property to be added.

Value

The value of the property to be added.

Flags

For use when setting Property Flags. The default value is cePropFlagNone.

Remarks

The Add method checks for existing objects with the same key in the collection. If appropriate, the existing object will be returned or updated; otherwise, an error is returned. In the case of the Properties collection, adding a property that is already in the collection will update the original property.

This method can also be used to add custom properties and property bags. For example, you could create a new InfoObject property called SI_COMMENTS; this property could then be retrieved from the InfoObject's Properties collection by using the name as an index:

QueryResult.Item(Index).Properties("SI_COMMENTS")



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com