MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Reference Library > Distribution > Expert Configurator > Key Concepts and Procedures > Expert Configurator Rules > Global Variable Rule

Global Variable Rule

 

The global variable rule functions just as a secondary variable rule except that the global variable rule can be shared between several bills of rules.  This is helpful when data for validation, pricing, and manufacturing is needed by more than one part.  For example, a user may wish to use a global variable to store the price of a configured component and then use that information when processing the pricing rules of the parent item to include the price of the component.  The global rule can be used to set up a global work field to temporarily store a value for subsequent use.  It is important to initialize a global variable the first time it is used.

A global variable rule can be defined for all three categories of rules:  sales order entry, pricing, and manufacturing. 

Identification

System Identifier:          13

Valid Rule Categories:   Sales Order Entry

                                    Pricing

                                    Manufacturing Order Processing

Action Expression 1

Description:                  Name of the global variable

Expression Type:          Non-syntax (text)

Length:                         15

Interpreted Type:           Not interpreted

Note:                            User-defined name for global variable

Action Expression 2

Description:                  Value of the variable

Expression Type:          Syntax

Length:                         320

Interpreted Type:           Logical, Alphanumeric, or numeric

Note:                            Value entered may be alphanumeric or numeric

Add a Global Variable Rule

1.   Display the Rules Maintenance Function Select screen.

a.   Select the Expert Configurator option from the System Application Menu.

b.   Select the Sales Order, Pricing, or Manufacturing Rule Maintenance options from the Expert Configurator Application Menu to display the select screen.

2.   Enter the Function Select information.

a.   Assign a unique number to the rule.

b.   Enter the action code for a global variable rule in the Action Code field.  Action codes are defined in category Y03 on the Reference File.

c.   Enter a 1 (addition) in the Maintenance Code field.

d.   Press the Enter key to display the header screen.

3.   Enter the header information.  See the Standard Rules Header screen (EC100S03) in the Screens section of this manual for more information.

4.   Press the Enter key to display the detail screen.

5.   Enter the detail information.

a.   Enter the condition statement.  (Optional)

The condition determines if the rule result is true or false.  If the condition expression is interpreted as true, the action expressions are processed.  Rules are released based on the result of the condition.  If no condition is entered, the condition is interpreted as true.  Usually the condition of a global variable rule is dependent on an option or a combination of options.  For example, the price of a product is usually dependent upon options chosen.  A condition statement for this global variable rule could be written:

·      (O-LUXURY,EQ,"Y"):  If the luxury version of this product was selected then process the following expressions.

b.   Enter the name of the global variable.  This field is not interpreted by the Expert Configurator.  Enter the name of the variable in the Variable Name field.

c.   Enter the value of the global variable.  This field is interpreted by the Expert Configurator, and must be in correct syntax.  For example, the name of the global variable entered above is PRICE, and the luxury version is 500 dollars more than the standard version.  The value would be (G-PRICE,+,500).  G-PRICE denotes that PRICE is a user-defined global variable field (PRICE=G-PRICE+500).  (See Variables in the key concepts section of the Overview for more information.)

6.   Press the Enter key to add this secondary variable rule to the Rule Master File.

Change a Global Variable Rule

1.   Select the Sales Order, Pricing, or Manufacturing Rule Maintenance option from the Expert Configurator Application Menu.

2.   On the Rule Maintenance Function Select screen:

a.   Enter the global variable rule number in the Rule Number field.

b.   Enter a 2 in the Maintenance Code field to change the header information for the rule.  Enter a 3 in the Maintenance Code field to change the detail information for the rule.

3.   Change the descriptive data for the rule and press the Enter key.

4.   If all fields are valid, the rule is changed on the Rule Master File.

Reactivate or Deactivate a Global Variable Rule

1.   Select the Rule Maintenance option from the Configuration Menu.

2.   On the Rule Maintenance Function Select screen:

a.   Enter the global variable rule number in the Rule Number field.  All rules released by this rule must be deactivated before this rule can be deactivated.

b.   Enter a 4 in the Maintenance Code field to deactivate the rule.  Enter a 5 in the Maintenance Code field to reactivate the rule.

3.   Press the Enter key to deactivate or reactivate the rule.

4.   Press F3 to exit without deactivating or reactivating the rule.