itemprevious

Identifies the previous item on the page, excluding the global item. An item is previous when it immediately precedes the current item in the build order (in other words, it comes immediately before the current item in the XFDL text).

This option is not saved or transmitted as part of the form. Instead, it is automatically created each time the form is read into memory, and is maintained only during display or processing.

Syntax

   <itemprevious>item reference</itemprevious>
Table 1. itemprevious parameters
Parameter Type Description
item reference string A reference to the previous item on the page, excluding the global item.

Available In

action, box, button, cell, check, checkgroup, combobox, data, field, help, label, line, list, popup, radio, radiogroup, richtext, signature, slider, spacer, toolbar

Example

The following example shows what two labels look like in memory, with the itemprevious option inserted in each:

   <label sid="LABEL2">
      <value>This is a label.</value>
      <itemprevious>LABEL1</itemprevious>
   </label>
   <label sid="LABEL3">
      <value>This is a label.</value>
      <itemprevious>LABEL2</itemprevious>
   </label>

You can use computes to determine the previous item on the form. For example, the following code shows a label that uses a compute to set its value. The compute goes to the item that currently has the focus, then copies the value of the itemprevious option from that item:

   <label sid="previousItemName">
      <value compute="PAGE1.global.focuseditem->itemprevious"></value>
   </label>

Usage details

  1. Defaults: none
  2. If the itemprevious option is in the first item on the page (excluding the global item), it points to the last item on the page.
  3. When the itemprevious option is used in items that appear in table rows:
    • Each item points to the previous item in the row.
    • The first item in a row points to the last item in the previous row.
    • The first item in the table points to the table.
  4. The itemprevious option is not saved or transmitted with form descriptions.