Example: Query mask

Example: Query mask

Initial situation

A list has the indexes CUSTOMERNO, ORDERNO, CUSTOMERNAME, and ARTICLE. A query mask is to be defined that forces users to enter either a customer number (CUSTOMERNO) or an order number (ORDERNO).

Required definitions

To achieve this requires a query mask with two subgroups: In one subgroup CUSTOMERNO is a required field, and in the other subgroup ORDERNO is a required field.

Recommendation: The query mask should be designed to make it clear to the user that there are two alternative ways of entering values for a query (the user is allowed to enter values in one subgroup only). This can be achieved by grouping the fields in a certain manner and possibly by duplicating some fields. Several approaches are possible.

Query mask without duplicated fields

The query mask could, for example, look like this:

PE97IX05 ---------------------------------------------------------------------
 Command ===> ________________________________________________ Scroll ===> PAGE

 Select List Index Entries
 Form: REJ Extension: INVENTORY Report:



 Customer number ===> ............ ONL
 ------- or
 Order number... ===> ............ ONL

 ----- Additional values (optional)

 Customer name.. ===> ________________________ ONL
 Article........ ===> ________________________ ONL


 Items with Hits: 0
 Lines with Hits: 0 Retrieve Immediately ===> YES (Y)es,(N)o

 Enter a value or a mask and press ENTER to generate the list index entries.
 Enter V to display, P to print, or press END to return to the previous panel.

To achieve this, the following elements for the query mask need to be defined (the position of each element in the query mask can be controlled by specifying an appropriate value in the Number field):

  • One element in subgroup 1 for the index CUSTOMERNO (Input required)
  • One element in subgroup 2 for the index ORDERNO (Input required)
  • Two elements in subgroup 0 for the indexes CUSTOMERNAME and ARTICLE
  • Four elements without a value in the Index Name field for additional texts and blank lines

Query mask with duplicated fields (1)

The query mask could also duplicate the optional fields to make it clearer that there are two alternative input groups:

PE97IX05 ---------------------------------------------------------------------
 Command ===> ________________________________________________ Scroll ===> PAGE

 Select List Index Entries
 Form: REJ Extension: INVENTORY Report:



 Customer number ===> ............ ONL
 Customer name.. ===> ________________________ ONL
 Article........ ===> ________________________ ONL
 or
 Order number... ===> ............ ONL
 Customer name.. ===> ________________________ ONL
 Article........ ===> ________________________ ONL



 Items with Hits: 0
 Lines with Hits: 0 Retrieve Immediately ===> YES (Y)es,(N)o

 Enter a value or a mask and press ENTER to generate the list index entries.
 Enter V to display, P to print, or press END to return to the previous panel.

To achieve this, the following elements for the query mask need to be defined (the position of each element in the query mask can be controlled by specifying an appropriate value in the Number field):

  • Three elements in subgroup 1 for the indexes CUSTOMERNO (Input required), CUSTOMERNAME, and ARTICLE
  • Three elements in subgroup 2 for the indexes ORDERNO (Input required), CUSTOMERNAME, and ARTICLE
  • One element without a value in the Index Name field for the text or between the two alternative input groups

Query mask with duplicated fields (2)

The query mask could also duplicate all fields to make it clearer that there are two alternative input groups, including the required field of one group as optional field in the other group.

PE97IX05 ---------------------------------------------------------------------
 Command ===> ________________________________________________ Scroll ===> PAGE

 Select List Index Entries
 Form: REJ Extension: INVENTORY Report:


 Customer number ===> ............ ONL
 Order number... ===> ____________ ONL
 Customer name.. ===> ________________________ ONL
 Article........ ===> ________________________ ONL
 or
 Order number... ===> ............ ONL
 Customer number ===> ____________ ONL
 Customer name.. ===> ________________________ ONL
 Article........ ===> ________________________ ONL


 Items with Hits: 0
 Lines with Hits: 0 Retrieve Immediately ===> YES (Y)es,(N)o

 Enter a value or a mask and press ENTER to generate the list index entries.
 Enter V to display, P to print, or press END to return to the previous panel.

To achieve this, the following elements for the query mask need to be defined (the position of each element in the query mask can be controlled by specifying an appropriate value in the Number field):

  • Four elements in subgroup 1 for the indexes CUSTOMERNO (Input required), ORDERNO, CUSTOMERNAME, and ARTICLE
  • Four elements in subgroup 2 for the indexes ORDERNO (Input required), CUSTOMERNO, CUSTOMERNAME, and ARTICLE
  • One element without a value in the Index Name field for the text or between the two alternative input groups