Documentation >
MAC-PAC Reference Library >
Distribution >
Expert Configurator >
Key Concepts and Procedures >
Exhibit B: Expert Configurator Multi-Level Example >
Validating Configured Screens Through the Use of Tables
Validating Configured Screens Through the Use of Tables
By utilizing the ability of the Expert Configurator to manage values in tables, we can validate options with many possible valid values without creating a rule to check for each one. Tables to be used by the configurator are defined on the Reference File category Y14. We utilized tables in our example to validate that the color entered by the user is a valid color. On category Y14 we entered the plant, table name, and table value associated with each color. For every valid color, we create a new record on category Y14 with the same plant, table name as the previous records, but the table value (the color) changes each time. See Common Features: Reference File Categories for more information. The figure below illustrates the entry of the color black into our DESKCOLOR table.
WILLIAMS COMMON FEATURES 3/03/92
DSP01 REFERENCE FILE CATEGORY Y14 FUNCTION SELECT
Category Name VALIDATION TABLES
PLT(3)TABLE(9)VARIABLE(15)
Category Key BELDESKCOLORBLACK
XXXXXXXXXXXXXXXXXXXXXXXXXXX
Request Code 4
1 - Add
2 - Change
3 - Delete
4 - Inquire
F3=Exit F7=End Category F9=Inquiry F8=Display List
|
Reference File Category Y14.
This illustrates the entry of the color black into the DESKCOLOR table.
To validate the color entered on the desk sales order option select screen, we create a rule to check the entered option against our table. The figure below illustrates the rule used to validate the color entered for the desk.
WILLIAMS PLT BEL EXPERT CONFIGURATOR 3/03/92
DSP01 SALES ORDER RULE MAINTENANCE DETAIL
SCREEN VALIDATION
Rule Number 00135 01 Part Number DESK-100 Action Code SV Vers 01
Condition
((O-LUXURY,EQ,"N"),&,(O-COLOR,EQ,"CEDAR"))
ERROR MESSAGE
CEDAR IS ONLY AVAILABLE IN THE LUXURY MODEL
F2=Command F3=Exit F7=Header F9=Inquiry
F10=Function Select F15=Rekey Data
|
The Sales Order Rule Maintenance Screen Validation Detail Screen.
The rule N(O-COLOR,EL,T-DESKCOLOR) means if the option value entered in the color field (O-COLOR) is not (N) an element (EL) of the table DESKCOLOR (T-DESKCOLOR), then display an error message.
We also created a similar screen validation rule for the drawer. The rule validates that the color entered for the drawers is also an element of the DESKCOLOR table. By verifying the color against the DESKCOLOR table, we ensure that the drawer color is a valid desk color without defining and maintaining another table. The rule to do this is illustrated below.
WILLIAMS PLT BEL EXPERT CONFIGURATOR 3/03/92
DSP01 SALES ORDER RULE MAINTENANCE DETAIL
SCREEN VALIDATION
Rule Number 00140 01 Part Number DRAWER-001 Action Code SV Vers 01
Condition
N(O-DRAWERCOLOR,EL,T-DESKCOLOR)
ERROR MESSAGE
CEDAR IS ONLY AVAILABLE IN THE LUXURY MODEL
F2=Command F3=Exit F7=Header F9=Inquiry
F10=Function Select F15=Rekey Data
|
The Sales Order Rule Maintenance Screen Validation Detail Screen.