CURCOLLECTION keyword

Applies To

All specifications

Description

Evaluates to the ID of the current collection. If there is no current collection, this keyword evaluates to an empty string.

The optional parameter INCLUEDOBJPREFIX determines whether the "object" prefix is included. In most cases where the value from the keyword is useful, for example, the P() and FP() keywords, you will not want this prefix. Instead, you can use the optional parameter ADDDOTIFNECESSARY, so that a P() or FP() keyword can concatenate in an expression like P(CURCOLLECTION(DOTIFNECESSARY)CURPROP()) and is resolved regardless of whether the current collection is the primary, a secondary, or subcollection.

Syntax

CURCOLLECTION( INCLUDEOBJPREFIX  | ADDDOTIFNECESSARY )

Remarks

A substitution keyword. Use this keyword to find the value of the current collection.

Examples

This expression will resolve to the value of the current collection's current property, which could be used in a variety of contexts:

P(CURCOLLECTION()CURPROP())

If a script needs to be passed a parameter that explains which collection is the current collection on a complex form (with secondary collections, or subcollections, for example), you can pass this for the value of a parameter to the script:

CURCOLLECTION(INCLUDEOBJPREFIX)

If a script or other event handler needs the current collection's current property's value, you can pass this for the value:

P(CURCOLLECTION(ADDDOTIFNECESSARY)CURPROP())