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

Secondary Variable Rule

 

The secondary variable rule can be used to set up a work field to temporarily store a value for subsequent use.  It is important to initialize a secondary variable the first time it is used within a bill of rules.  This will ensure accurate results when processing multiple transactions.  This type of rule is helpful in calculating a price for a configured part, for example.  Preliminary prices can be stored in work fields, until a final price is ready to be calculated.  A secondary variable rule can be defined for all three categories of rules:  sales order entry, pricing, and manufacturing. 

Identification

System Identifier:          10

Valid Rule Categories:   Sales Order Entry

                                    Pricing

                                    Manufacturing Order Processing

Action Expression 1

Description:                        Name of the secondary variable

Expression Type:                Non-syntax (text)

Length:                               15

Interpreted Type:                 Not interpreted

Note:                                  User-defined name for the secondary 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 Secondary 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 secondary 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 secondary variable rule is dependent on an option or a combination of options.  For example, the Secondary Variable Rule price of a product is usually dependent upon options chosen.  A condition statement for this secondary 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 secondary 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 secondary variable.  This field is interpreted by the Expert Configurator, and must be in correct syntax.  For example, the name of the secondary variable entered above is PRICE, and the luxury version is 500 dollars more than the standard version.  The value would be (S-PRICE,+,500).  S-PRICE denotes that PRICE is a user-defined secondary variable field (PRICE=S-PRICE+500).  (See Variables in the Key Concepts section for more information.)

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

Change a Secondary 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 secondary 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 Secondary Variable Rule

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

2.   On the Rule Maintenance Function Select screen:

a.   Enter the secondary 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.