Re-Order Maintainer

 

The Re-order maintainer is a useful template for re-sequencing sequential table data. The template uses drag and drop functionality making it easy to re-order your records.

Creating the Re-Order Maintainer

A re-order maintainer updates only one field within a table, a re-order field. To create a re-order maintainer, the table that you are working with must already have a field with sequential data that can serve as the re-order field. In addition, the table must have one or more other fields that make the records unique. When selecting your sequence fields be sure to include all of these sequence keys in addition to the re-order field. In the example above, the field “SEQUENC” serves as the re-order field while “Order Number” and “Order Line” are the unique keys for the table. I have sequenced by all three fields.

Before compiling the re-order maintainer, you will need to specify which field contains the sequential data and will serve as the re-order field. In Field Settings, select this field and select “S” from the user defined field control dropdown.

At runtime, you can reorder your records by simply dragging and dropping each record into the desired order. In the example below, record 6 is being moved to the 2nd position. The re-order maintainer provides update mode only.

Avoid one-to-many relationships

There may be times when you wish to join out to one or more tables in a re-order maintainer. When doing this, be sure to avoid one-to-many relationships. If a one-to-many relationship is present in a re-order maintainer, it is possible to duplicate or lose values in the re-order field after updating.