Concepts

Variables are the basic properties, or data points, associated with the product. The most obvious purpose for variables is to capture the information necessary for pricing products; however, variables are just as valuable for capturing the information used in production.

Variables may be either global or local. Local variables are used for temporary calculations during order entry. They are convenient when you need to simplify complex calculations, but they cannot directly hold User-entered information. Global variables are used for storing information, calculations, and other data that are used throughout the program. Anything a User enters or gets back will use global variables. Throughout this manual, whenever we use the term variable by itself, we are referring to global variables. They are the workhorse of Control.

To use a global variable, the first thing you must do is define it. When you define a global variable, you are making it accessible by all products. You can also specify default information that may or may not be used by the product. Properly setting up the default values for global variables can save you a lot of work and make the system easier to maintain.

To capture the different types of data encountered, Control provides a number of variables types for use. Each data type allows you to specify the defaults and related information to make using the variable much easier.

The variable data types supported in Control are:

  • Numeric
  • Yes/No (Boolean)
  • Text
  • Selection List
  • Table Lookup
  • DateTime
  • Image

Screens

Main Menu | Setup | Pricing Setup | Variables

All of the information to define a variable is on one screen. Each variable type has different information fields, so we will cover them separately in the following sections.

Figure 7 1 Common Variable Setup Information
The information common to all variables includes:
Variable Name The name of the variable. This name should be meaningful as it will be used through Control to identify the information stored within it. The variable name may not contain spaces or special characters. After you have created the new variable, you can click on the Rename button to change its name.
|| Any references that refer to the variable by name (such as in pricing formulas, Pricing Forms or Product Layouts) will have to be manually changed if you rename a variable. If you must rename a variable, it is strongly recommend that you run the formula verifier (under the Tools menu) afterwards to see what formulas may have been broken. ||

Variable Category Select the category to organize this variable under.
Variable Type Select the type of data that will be stored in this variable. Selection of the variable type determines the remaining options and how you may use the variable.
Valid variable types are:
* Numeric
* Yes/No (Boolean)
* Text
* Selection List
* Table Lookup
* DateTime
* Image
Save Extra Transaction Variable Records for Reporting If this box is checked, Control will save an extra record in the database when this product is used in a line item.
Notes The notes field is provided to explain the purpose of the variable or record other information that might be helpful when referencing it later (for instance, an explanation of the formula).
 \\ || **Saving the additional records for variables come at the expense of increasing the time to save orders and estimates.  Unless you have a specific need for this information, it is recommended that you leave this box unchecked.** ||

Numeric Variable Setup Screen

Figure 7 2 Numeric Variable Setup Screen

Units for Entering Values Enter the unit for entering a value for this variable in a pricing form.
Units for Displaying Values Enter the unit to use for displaying this variable on the pricing form or in a product layout.
The DisplayVariableValue () function in CFL will automatically format a variable in the units entered for it's display value field.
Answer Required | Use Default Value Select this option to manually specify if a value for this variable is required or not. If the checkbox is checked, the operator will not be able to complete the order without entering a value for this variable.
Answer Required | Use Formula Select this option to use a formula to determine when this value is required. If the formula returns True (or any non-zero value), the operator will not be able to complete the order without entering a value for this variable.
Default | Use Default Value Select this option and enter a number if you always want to use the same default value for this variable.
Default | Use Formula Select this option if the default value is calculated by a formula. Formula default values are often used for variables that aren't normally manually entered by the user (like Area Height * Width) or when a value might be based on another variable (like ListPropertyValue( ColorList, “SheetSize”) ).
Valid Range Enter a minimum and maximum value that this variable may have. If a higher value is entered or calculated, it is automatically adjusted to the maximum value. Likewise, if a lower value is entered or calculated, it is automatically adjusted to the minimum value. No warning message is generated when the adjustments occur unless you are using a spin-edit to enter the number. Set both values to zero (0) if you want Control to ignore the range.

Text Variable Setup Screen

Figure 7 3 Text Variable Setup Screen
|| Answer Required | Use Default Value || Select this option to manually specify if a value for this variable is required or not. If the checkbox is checked, the operator will not be able to complete the order without entering a value for this variable. ||

Answer Required | Use Formula Select this option to use a formula to determine when this value is required. If the formula returns True (or any non-zero value), the operator will not be able to complete the order without entering a value for this variable.
Default | Use Default Value Select this option and enter default text if you always want to use the same default value for this variable.
Default | Use Formula Select this option if the default value is calculated by a formula. Formula default values are often used for variables that aren't normally manually entered by the user (like Product.Description) or when a value might be based on another variable (like ListPropertyText, ColorList, “VendorSKU”) ).

Yes/No Variable Setup Screen

Figure 7 4 Yes/No Variable Setup Screen
|| Default | Yes By Default || Select this option if the default value for this variable should be Yes/True. ||

Default | No By Default Select this option if the default value for this variable should be Yes/True.
Default | Use Formula Select this option if the default value is calculated by a formula. Formula default values are often used for variables that aren't normally manually entered by the user (like Width > MaterialWidth for the IsPanelling variable).

List Variable Setup Screen

Figure 7 5 List Variable Setup Screen
|| Answer Required | Use Default Value || Select this option to manually specify if an answer for this variable is required or not. If the checkbox is checked, the operator will not be able to complete the order without entering a value for this variable. ||

Answer Required | Use Formula Select this option to use a formula to determine when this value is required. If the formula returns True (or any non-zero value), the operator will not be able to complete the order without entering a value for this variable.
Limit to List Check this box to prevent the operator from entering any value that is not in the selection list. If this box is unchecked, the User may type in custom values for this variable.
Default List Select the default selection list to use for this variable. This list may be overridden if there is a value in the Use Secondary List From field.
Default | Use Default Value Select this option to select a default value if you always want to use the same default value for this variable.
Default | Use Formula Select this option if the default value is calculated by a formula. Formula default values are often used when a value might be based on another variable (like ListPropertyText( Machine, “MaxMaterialWidth_Inches”) ).
Filter You may filter the rows in a selection list by entering the name of a filter here. Only selection list items with that filter checked will be displayed in the drop-down.
Use Secondary List From If the selection list to use for this variable normally varies based on a preceding choice by the operator, check this option. Select the variable that contains the primary value that determines which list to use.
Dependent List Name Because one selection list may have multiple dependent lists, you must enter the name of the dependent list this variable is switched on.
Default Part Description Enter a part usage description for the part that is linked in the selection list for this variable. This value is used when the selection list links to a part and chooses Use Parent Default for the description.
Default Part Consumption Fx Enter a default consumption formula to use for the part that is linked in the selection list for this variable. This value is used when the selection list links to a part and chooses Use Parent Consumption F(x) for the description.

Table Variable Setup Screen

Figure 7 6 Table Variable Setup Screen
|| Default Pricing Table || All pricing tables are shared and may be used by multiple variables (both global variables and product specific variables). Select the pricing table to use for this variable. To create a new pricing table, select (new) from the drop-down list. ||

Setup Table Click this button to open a new window and setup the variables, row values and column values for the table. Refer to the section on Lookup Table in pricing setup for information on setting up lookup tables.

Figure 7 7 Table Setup Dialogue
Edit Table Click this button to open a new window and edit the values for the table. Refer to the section on Lookup Table in pricing setup for information on setting up lookup tables.
\\ //Figure 7 8 Table Edit Dialogue// \\ Date Time Variable Setup Screen \\   \\ //Figure 7 9 DateTime Variable Setup Screen// \\ || **Answer Required | Use Default Value** || Select this option to manually specify if a value for this variable is required or not.  If the checkbox is checked, the operator will not be able to complete the order without entering a value for this variable. ||
Answer Required | Use Formula Select this option and select use a formula to determine when this value is required. If the formula returns True (or any non-zero value), the operator will not be able to complete the order without entering a value for this variable.
Default | Use Default Value Select this option and select default date and time if you always want to use the same default value for this variable.
Default | Use Formula Select this option if the default value is calculated by a formula. Special date functions and constants are defined in CFL especially for such date calculation.

Image Variable Setup Screen

Figure 7 10 DateTime Variable Setup Screen

The Image variable is a special system variable and the only variable that may be of the Image variable type. Assigning the image variable to a product allows it to store an external artwork or image file. There are no configurable options for the image variable type.

Effective Use

New Control Users may have trouble differentiating when to reuse variables between products and when to create new variables for a product.

Suppose you have two products, Product A and Product B, both of which require a property for the color of the product. Both products use different selection lists of possible colors, ColorListA and ColorListB. Product A and Product B are normally purchased in white.

  1. A single global variable, Color, could apply to both products. You would override the selection list used for each list. The default value could be set in the global definition or in each product.
  2. You could create two global variables, ColorA and ColorB. At the global definition level, you would specify the selection list for each as well as the default value. ColorA would go with ProductA and ColorB with ProductB, leaving all default values intact.

Either of these approaches will work. However, there are points to consider when deciding which approach to use.

  1. The single variable touts reusability. Pricing forms, product layouts, and formulas can be reused if the variable names remain the same for ProductA and ProductB.

If you think about the height variable, for instance, many products that use height will also use an area variable. If height and width are shared, then the formula in area (Height * Width) can be shared.

  1. With unique variables for height, you will either have to create unique variables for area or at least override the formula for area for each product.

Clarity is another important concept to consider. In this example, both variables store the color of the product. Therefore, any reference to the variable as Color will make sense to someone looking at the product setup six months later.

On the contrary, if ProductA had a color but ProductB had only a flavor, using the Color variable to store the flavor would work, but would violate the clarity concept.

References to the color in Product B would be confusing to anyone trying to understand the product setup later on. Even though it may mean a bit of extra work and less reusability, you should not reuse the Color variable for flavor.

Lastly, you must consider the data type of the variable. A variable can only have one fixed data type. Quantity is a number variable. You may not use it directly with a selection list. You will need to create a new variable that can contain a selection list.

In the case of Product A and Product B, most implementers would probably use the single Color variable in this case and override the selection list/set defaults in the product.

The only exception to this is when you might export these products and import them into another dataset – which seldom applies to End-Users - this normally applies to you if you are at a corporate multi-location or franchise operation.

See Also

You could leave a comment if you were logged in.