Show TOC

.dimLocate this document in the navigation structure

Use

You use the .dim attribute to determine the dimension of arrays or multiple value fields. This is important for step loops, which are represented as multiple-value fields.

Suppose a step loop consists of a column based on the field vbcom-kunde :

  • If the column has 20 rows, vbcom-kunde.dim returns the value 20.

  • If the column has only one row, vbcom-kunde.dim returns the value 1.

  • If no field is defined, the value returned is 0.

You can access specific values of such an array by specifying an index in square brackets. The value range of the index is from 1 to .dim.

Example

The following code processes an array based on the vbcom-kunde field:

`repeat with i from 1 to vbcom-kunde.dim`

<input

type=text

name="`vbcom-kunde[i].name`"

value="`vbcom-kunde[i].value`">

`end`

The value of .dim must be within the defined dimension of the array:

  • If you supply a negative index, a runtime error occurs.

  • If you supply an index greater than the value defined by .dim, the result is an empty string.