Create Sorting Order Displayed in Browse Windows

This document explains how to create a user defined sorting order, displayed in browse windows (when you press F4=Prompt for searching).

In some browse windows, you can select sorting order. In 'Sorting Order in Browse Window. Open' (MNS180) you create user defined sorting orders to be displayed in browse windows..

Note: This function requires a good knowledge of M3 tables and logical views.

Outcome

User defined sorting order for browse windows is created.

The user defined sorting orders are stored in the CMNUQL table.

Use this process in browse windows where it is possible to select sorting order.

Before you start

This function requires a good knowledge of M3 tables and logical views.

Follow these steps

  1. Start 'Sorting Order in Browse Window. Open' (MNS180).

  2. Enter the Object field with MITMAS. Define an ID for the sorting order

  3. Open the E panel and fill in name. In the File field you fill in the logical view/file you want to be displayed. This is the master file in this sorting order.

  4. If you want more than one logical view to be displayed you can fill a secondary file in the 'Join file' field.

  5. Open the F panel. The key fields in the selected master file are displayed here.

  6. The Key type fields indicate how the key fields in the file are to be processed when the file is read. EQ = The field should always be read "equal to" depending on where the inquiry is made.

  7. Fill in the Join From/To fields.

    Note: Fields that will be joined must contain the same number of positions and be of the same type (for example, numeric).
  8. Open the G panel. Here is all fields displayed. Fields with 1/xx is in the master file. Fields with 2/xx is in the secondary file. Select which fields to be displayed and in which sequence by entering 10, 20, 30 in the 'Sequence number' field.

  9. Open the H panel, continue to the I panel.

  10. The field headings are suggested in the 'Column heading 1 and 2' fields. You can change the content in the field headings in Column 1.

  11. The 'Field length' field is used to enter the field length for alphanumeric fields. If left blank, the field length in the database is displayed.

  12. Press Next and the sorting order is created.

Parameters to set

Program Field This field indicates...
(MNS180/B) Object ...the table/file for which the browse windows search. Example: the 'Item no' field is browsing for MITMAS records.
(MNS180/B) Sorting order ...the user defined identity of the sorting order
(MNS180/B) User ...the user which is allowed to use this sorting order. User 'blank' means all users are allowed.
(MNS180/E) File ...the logical view (the master view) from where records should be selected
(MNS180/E) Join to File

...the logical view(the secondary view) from where records should be selected.

This is used if you want records to be selected from more than one table

(MNS180/F) Key field The key fields included in the view (the master view) that you selected
(MNS180/F) Key type

...how the key fields in the file are to be processed when the file is read.

The valid alternatives are:

EQ = The field should always be read "equal to" depending on where the inquiry is made using F4 = Prompt.

SE = The field is opened to allow specification of different values in the window where the result of an F4 = Prompt inquiry is displayed. These values are then read "equal to."

(MNS180/F) Join type

...how the template retrieves information located in more than one table.

These fields are not displayed if you not select 'Join file' on th E panel.

The valid alternatives are:

1 = Matching records. Only selects records that are found in all tables.

2 = Records that match the master file. Selects all records in the master table and the matching records from the secondary table.

3 = Records that do not match the master table. Only selects the records in the master table that are unique, that is, the ones that do not have matching records in the secondary table.

(MNS180/F) Join from/ Join to

...how the different fields are to be combined.

The field name should begin with 'x' (where x = 1, 2 or 3) to indicate from which file the field is retrieved.

Note: Fields that will be joined must contain the same number of positions and be of the same type (for example, numeric).
(MNS180/G) Sequence number Where the field should be displayed in the browse window. From left to right.
(MNS180/I) Field length This field is used to enter the field length for alphanumeric fields. If left blank, the field length in the database is displayed.
(MNS180/I) Number of decimal places

...the number of decimal places that the field should contain.

The information is only relevant for numerical fields (type S or P).

(MNS180/I) Column heading 1 and 2

...the contents of the heading line.

You can change the default content and fill in a user defined content.