Creating a Counter Field

Count and counter fields are repeating fields. A counter field identifies a specific loop in a series of loops, in sequential order. Counter fields occur multiple times with their associated repeating fields.

Use this procedure to create a counter field.

  1. Right-click the map object that precedes the delimited field you are creating and select either Create Sub > Counter Field or Insert > Counter Field.

    The system displays the NCPDP Counter Field Properties Dialog Box with the Name tab selected.

  2. O the Name tab, type the name of the field.
  3. Type the description for the field and click OK.
  4. On the Tag tab, do the following:
    1. Type the field identifier.
    2. To specify that the order of this field is fixed, select Fixed Order.
      Note: The NCPDP standard requires count fields to be in a fixed order.
    3. Click OK.
  5. On the Repeat tab, do the following:
    1. Specify the minimum and maximum number of times that the field can repeat. The default value for Maximum Usage is 1.
    2. If this field is part of a loop, select Treat this field as a repeating field. This option enables you to link this field to a field that is at a different nesting level (one level up).
      Note:
      • Selecting this checkbox reduces the nesting level of the segments within the group by one.
      • When you link fields on the input side of your map to fields on the output side, the Application Integration subsystem normally requires that you link a single-occurring field to a field that is at the same level of nesting. The "Treat this field as a repeating field" option allows you to link fields that are in different nesting levels. If you do not select this option, you must link this field to a field that is at the same nesting level.
  6. Click OK to save the changes to the field.