MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Reference Library > Distribution > Expert Configurator > Key Concepts and Procedures > Exhibit B: Expert Configurator Multi-Level Example > Global Variable Rule

Global Variable Rule

 

Global variables are used in multi-level environments to provide access to values which are needed by more than one part in a multi-level configuration process.  In our example, we want a global variable to represent the color of the drawer.  When the drawer configuration is complete, and configuration of the desk resumes, we must verify that the color selected for the drawer is compatible with the color selected for the desk.  If the drawer color is not compatible, we display an error message and allow for modification of the desk color or the drawer color by re-displaying the desk sales order option select screen.  Note that there are other methods which you could use to validate these values, and that the global variable may be used for other functions. 

In our example, we defined DRAWERCOLOR as a global variable in drawer configuration and assigned the value of the color entered on the drawer sales order option select screen.  This rule must follow the screen generation rules since it requires the value entered for the color option on that screen.  The figure below shows the global variable rule we defined.

 

WILLIAMS   PLT BEL           EXPERT CONFIGURATOR                       3/03/92

 DSP01                   SALES ORDER RULE MAINTENANCE                    DETAIL

                           GLOBAL VARIABLE                                     

Rule Number     00150 01 Part Number      DRAWER-001      Action Code GV Vers 01

 Condition                                                                     

                                                                               

                                                                               

                                                                               

                                                                                

 VARIABLE NAME                                                                 

DRAWERCOLOR                                                                    

                                                                               

                                                                               

                                                                               

 VALUE                                                                          

O-DRAWERCOLOR                                                                  

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

 F2=Command          F3=Exit             F7=Header           F9=Inquiry        

 F10=Function Select F15=Rekey Data                                            

 The Sales Order Rule Maintenance Global Variable Detail Screen.

 

See Global Variable Rule for more information on global variables.

After this rule is executed, the global variable DRAWERCOLOR will contain the value of the color option for the drawer.  When processing returns to the desk, we can validate that this global variable matches the color option selected for the desk.  A Screen Validation Rule is created for the desk immediately following the Configured Component Rule.  In this way, we validate that the colors match before proceeding with any other rules.  The figure below shows the Screen Validation Rule for the desk that is used to verify the two colors.

 

WILLIAMS   PLT BEL           EXPERT CONFIGURATOR                       3/03/92

 DSP01                   SALES ORDER RULE MAINTENANCE                    DETAIL

                               SCREEN VALIDATION                               

Rule Number     00155 01 Part Number      DRAWER-001      Action Code SV Vers 01

 Condition                                                                     

N(G-DRAWERCOLOR,EQ,O-COLOR)                                                    

                                                                               

                                                                               

                                                                                

 ERROR MESSAGE                                                                 

DRAWER COLOR MUST MATCH DESK COLOR.                                            

                                                                               

                                                                               

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

 F2=Command          F3=Exit             F7=Header           F9=Inquiry        

 F10=Function Select F15=Rekey Data                                            

      The Sales Order Rule Maintenance Screen Validation Detail Screen.

 

We also wanted the price of our desk to include the price of the drawers.  To do this, we defined a global variable for the price of the drawers which is added to the desk price during execution of the desk pricing rules.  The Pricing Rules section of this example explains the pricing on the desk and drawers in more detail.