This window is displayed by clicking on the Classes option in the Catalogue menu
The left grid defines the classes themselves. This can be sorted by Number or Description by clicking on the [A/Z] button
The top right grid is used when the selected class is sorted by sort fields to select the fields to use.
The lower right grid lists the available choices for sort fields with fixed choices.
Each item in the stock list has an associated class. Classes are used to group similar kinds of items or items with similar or related usage.
Eg the Casing 5”-13 3/8” class could contain casing joints, pup joints, crossovers, casing shoes etc related to casing strings in those size ranges.
Advanced option: This
table should normally only have items added by the database administrator and
is used infrequently.
There is no provision for
prevention of duplicate records being added at different sites on the same day.
1. Click "+" to open dialog and add a new record (click "▲" to open an existing record to edit, and "-" to delete a record)
2. Enter a meaningful description for the class. This should allow sensible sorting in the class list and allow for easy selection by a user when adding a new stock item.
3.
Indicate the sort order.
1 – normal, sorts by Nomenclature, size and description
2 – Sort fields, uses the sort fields as defined in the right grid as an alternative
sort order.
4. The [Check unused] initiates a scan of all stock items to find which classes have been used or not used. Those that are not used are indicated by a YES in the Del column
5. The [Remove unused] button will actually delete the items marked with a YES in the Del column. You can, of course, manually change these values before running the option. The records are not physically deleted from the data table but are hidden and ignored. A pack is required to physically remove deleted items from a table.
6. The [Undelete] button will redisplay any deleted records. Once a Pack has been performed, records are permanently deleted and cannot be undeleted.
7. The Show all, Show keep and Show delete radio buttons are used to select the classes based on the Del value. Eg to see which records would be deleted, select the Show delete option.
8. If a class has been merged into another or needs to be renamed, you can enter the new class description into the replace with column. The replace value must be an existing class and the easiest way to handle this is to use a copy and paste.
9. When the [Replace] button is clicked any items in the stock list with the selected class will have it replaced with the replacement class.
10. If the All classes check box is ticked the operation will replace all classes with their replacement, if it is not blank.
11. The [Remove replaced] button will delete any classes with a replacement value filled in.
12. The top right grid displays list of sort fields used for the selected class, if sort index =2, otherwise it will be blank.
13. The sort fields cannot be added or deleted from this grid directly but are manipulated by clicking on the [Add, Delete or Reorder] button which displays the dialog as described below.
14. Sort fields can also be set to duplicate those used for an existing class by clicking on the [Copy] button.
15. Each sort field can have flags set to indicate if a value is required and whether any value can be entered or only a fixed set of values is accepted.
16. For a fixed value sort field the list of values is displayed in the lower grid, otherwise it will be blank. Additional values can be added by clicking + and editing in the grid. A 4-character value is defined, with a longer description. It is advisable to use values that give a sensible sort order, eg 05, 07,10 is better than 5,7,10
17. The [Extract sort field values] button will scan the existing stock items for items in classes that use the selected sort field and extract any value already sort used. This can quickly populate the fixed choices field with values that have already been used.
18. Again it is possible to replace values with alternative values. For example if 7” casing has been indicated by 7.00 in some places and 07 in others the former can be set to the latter.
19. The [Update stock] button will apply the replacements as defined. They will need to be deleted manually afterwards.
For classes that use sortfields, this option displays a dialog with 2 lists.

This dialog is modal; it must be closed before any other form can be accessed.
1. The left list shows available sortfields as defined in the sortfields table, in Alphabetical order.
2. The right list shows the existing sortfields for the class in their sort order.
3.
Items are moved from the left to the right list (and vice
versa) by double clicking them, or by selecting them and clicking on the [>]
and [<] buttons.
The [>>] and [<<] buttons move all items from one list to the
other.
4. The red arrows are used to move the selected items up and down with in the right hand list.
5. Click OK to save the new sort field list.
6. If the check box is ticked, then the order of the existing sortkey in all stock items for the class will also be reordered to match. Normally this would be checked unless correcting and mismatch between sort keys and the definition.
The following dialog is displayed when the [Copy] button is clicked.

This dialog is modal; it must be closed before any other form can be accessed.
1. The target class defaults to the selected class but the dialog can be used to do a copy for an unselected class.
2. The Source class is selected from the existing classes.
3. You can select whether to copy the sort fields and/or the fixed values for sortfields that are common to both classes.
4. Click [OK] to start the copy.
Document Classes.htm