Extend()

Category: Repeating

Syntax: Extend ( non-repeatingField )

Parameters:

non-repeatingFieldAny non-repeating field (a field defined to contain only one value).

Data type returned: Text, Number, Date, Time, Timestamp, Container

Description:

Allows a value in non-repeatingField to be applied to every repetition within a repeating field (most commonly a calculation field). Without using the Extend() function, only the first repetition of a repeating calculation field will properly reference the value in non-repeatingField.

Examples:

Given a number field RepCommission, defined to hold three repetitions, a non-repeating number field (SalePrice), and repeating calculation field (SalesCommission), defined as follows:

Round ( RepCommision * Extend ( SalePrice ); 2 )

RepCommission

SalePrice

SalesCommission

.10

18.00

1.80

.12

 

2.16

.15

 

2.40

Without the Extend() function, only the first repetition of SalesCommission would have returned the correct value.

Категории