Sorting Options: Select/Omit

When you create sorting options, you can choose whether a certain field value should be selected or omitted when the sorting order is displayed.

This document describes the rules, valid combinations, and invalid combinations for the ‘Select/Omit’ field on the (CRS021/F) panel.

Outcome

Combinations for the Select/Omit and Operator fields are described.

Sorting options are stored in the CSYSOR table.

Sorting Options: Select/Omit allows you to display records faster when you make selections than when no selections are made. Also, it allows easier search options for relevant information.

Description

Valid alternatives for Select/Omit

The valid alternatives for the Select/Omit field are:

  • O = Omit these fields and their values to display
  • S = Select these fields and their values to display
  • Blank = This record will have the same value as the record above (O or S)
    Note: It is strongly recommended not to use O = Omit.

Valid alternatives for operator

The alternatives are:

  • EQ = Equal to
  • NE = Not equal to
  • LT = Less than
  • LE = Less than or equal to
  • GT = Greater than
  • GE = Greater than or equal to.
    Note: Avoid using alternative NE.

Rules when S (Select) is used

If you use only Select (S), then selected records and their selected values will be displayed. No other records and values will be displayed.

Note: Only operator EQ is used in these examples.
  • One select

    S/O

    Field

    Op

    Value

    S

    OACUNO

    Customer no

    EQ

    1000

    Result:

    Only records that contain customer 1000 are displayed.

  • Repetitive select

    S/O

    Field

    Op

    Value

    S

    OACUNO

    Customer no

    EQ

    1000

    S

    OACUNO

    Customer no

    EQ

    1001

    Result:

    Only records that contain customer 1000 and 1001 are displayed

    Note: Avoid using different fields when you have repetitive S. Technically it works, but it can be difficult to logically understand the results.
  • Select and blank

    S/O

    Field

    Op

    Value

    S

    OACUNO

    Customer no

    EQ

    1000

    OAORTP

    CO type

    EQ

    FFO

    Result:

    Records that contain customer 1000 with order type FFO are displayed. Blank is the same as ‘and’, referring to the row above.

  • Repetitive select and blank

    S/O

    Field

    Op

    Value

    S

    OACUNO

    customer number

    EQ

    1000

    OAORTP

    customer order

    EQ

    FFO

    S

    OACUNO

    customer number

    EQ

    1001

    OAORTP

    customer order

    EQ

    FFO

    Result:

    Records that contain customer 1000 with order type FFO, and customer 1001 with order type FFO, are selected.

Rules when O (Omit) is used

If you use only Omit (O), then omitted records and their omitted values will not be displayed. All other records and values will be displayed.

It is strongly recommended not to use O = Omit.

Note: Only operator EQ is used in these examples.
  • One omit

    S/O

    Field

    Op

    Value

    O

    OACUNO

    Customer no

    EQ

    1000

    Result:

    Records that do not contain customer 1000 are selected.

  • Repetitive omit

    S/O

    Field

    Op

    Value

    O

    OACUNO

    Customer no

    EQ

    1000

    O

    OACUNO

    Customer no

    EQ

    1001

    Result:

    Records that do not contain customer 1000 and 1001 are selected.

    Note:  Avoid using different fields when you have repetitive O. Technically it works, but it can be difficult to logically understand the results.
  • Omit and blank

    You are not allowed to have blanks after O. M3 will ignore blanks after O.

Rules when Select and Omit are used

Basic rules

  • You cannot have O after S.
  • You cannot have O after S.
Note: Only operator EQ is used in these examples.
  • One O, One S

    S/O

    Field

    Op

    Value

    O

    OACUNO

    customer number

    EQ

    1000

    S

    OAORTP

    customer order

    EQ

    FFO

    Result:

    Except for customer 1000, records that contain order type FFO are selected.

  • Repetitive O, One S

    S/O

    Field

    Op

    Value

    O

    OACUNO

    customer number

    EQ

    1000

    O

    OACUNO

    customer number

    EQ

    1001

    O

    OAORTP

    customer order

    EQ

    FFO

    Result:

    Except for customer 1000 and 1001, records that contain order type FFO are selected.