COLLECTION keyword

Applies To

  • Form components
  • Component property: Data binding

Description

Retrieves the value of a property from an IDO that is not in use on the current form.

Syntax

COLLECTION( IDO( PROPERTY( PropertyName ) [ FILTER( ) ] [ SETP( ) ] [ SETV( ) ] [ SETC( ) ] ) ) )

Part Description
IDO The name of an IDO.
PropertyName The name of a property in the collection returned by IDO.

Remarks

This is a substitution keyword. Use the COLLECTION keyword to specify the data binding of a read-only component. Its value is updated when the StdFormLoadDerivedValues event is generated during, for example, a Save or navigate operation. To force an update when the value of the property changes, use the DEPENDENCY keyword with the COLLECTION keyword.

The COLLECTION keyword normally should not be used because it is evaluated each time the user navigates the collection, requiring a network round trip. The efficient way to retrieve the needed value is to add a new property to the IDO that is in use on the form. If you do not have the ability to alter the IDO, use the COLLECTION keyword.

A form uses a property named PartAbcCode. You wish to display the description associated with the code, but the IDO in use on the form does not have a property corresponding to the description. Another IDO named ACME.AbcCodes provides the description in a property named AbcDesc. The example below retrieves the description property. It could be used as the data binding of a read-only edit component.

COLLECTION(ACME.AbcCodes(PROPERTY(AbcDesc) FILTER(AbcCode=FP(PartAbcCode))))