Array Rules

This section describes each of the available array rules.

For the procedure to define array rules, see Defining Array Rules.

Array Size

The Array Size rule defines an array with a variable number of occurrences.

Example

The Glsystem file stores the period-ending dates for a company in the Prd End Date array field. This field occurs 12 times. The Nbr Periods field, also in the Glsystem file, is a 2-digit numeric field that stores the number of periods in a company's fiscal year. Nbr Periods can have any value from 1 to 13. In the following rule, if Nbr Periods is 4, the Prd End Date array has 4 occurrences; if Nbr Periods is 12, Prd End Date has 12 occurrences.

Array Prd End Date Size Is Number Periods

Edit Sequence Rules

Edit Inc Seq, Edit Dec Seq, and Edit Contiguous

The Edit Sequence rules edit the values in an array to ensure that they are in the correct sequence. You can type array values in increasing or decreasing sequence.

Example

The Prd End Date field occurs 12 times. The values typed in are the 12 period-end dates for the company's fiscal year. If you apply the Edit Inc Seq rule to this array field, you must type the field values in increasing order (for example, 013196 before 022996). If you apply the Edit Dec Seq rule to this array field, you must type the field values in decreasing order (for example, 022996 before 013196). In an increasing or decreasing sequence, every field in the array does not have to have a value. In a contiguous sequence, all blank fields in the array must be at the end.

The following rules edit the Prd End Date array to ensure that its values are in increasing sequence and that all blank fields in the array are at the end. If not, the system displays an error message.

Edit Array Prd End Date Contiguous
Edit Array Prd End Date For Increasing Sequence

Make Sequence Rules

Make Dec Seq, Make Inc Seq, and Make Contiguous

The Make Sequence rules sort the values in the array according to the sequence selected. You can sort the values in the array in increasing or decreasing sequence.

Example

The Prd End Date field occurs 12 times. The values typed in are the 12 period-end dates for the company's fiscal year. If you apply the Make Inc Seq rule to this array field, the rule sorts the field values in increasing order (for example, 013196 is before 022996). If you apply the Make Dec Seq rule to this array field, the rule sorts the field values in decreasing order (for example, 022996 is before 013196). In an increasing or decreasing sequence, every field in the array does not have to have a value. In a contiguous sequence, all blank fields in the array must be at the end.

The following rule sorts the Prd End Date array in increasing sequence, placing all values in the array before any blanks.

Make Array Prd End Date Contiguous
Make Array Prd End Date Increasing Sequence

No Duplicates

The No Duplicates rule states that an array cannot have duplicate values.

Example

The following rule states that each date in the Prd End Date array must be unique.

Array Prd End Date Can't Have Duplicates