5.9. Enumerations


<< Prev   Next >>

Enumeration is the service data type, which is not used separately but with other data types. The enumeration can be defined as the list of possible attribute values.

Enumerations are used when entering attribute values of documents and catalogs or when entering constant values in cases where you need to exclude ambiguous information input.

Let us use the "customer status" concept as an example. In the simplest form, there are retail customers and wholesale customers. The customer status is usually associated with the level of discount from retail price.

Such "statuses" list like retail, wholesale is an example of simple enumeration. When writing out an invoice, the user has to specify the customer status by choosing it from the list. The specified customer status defines the prices.

If the customer status is entered during configuration of enumeration task, an expert configuring 1C:Enterprise can set the options for retail price calculation depending on the specified status.

First of all, you cannot add new items to an enumeration when performing operations with it. You can specify its values only when you configure the enumeration in Designer.

The enumeration lacks nesting ‑ all its values are on the same level.

The main feature of enumeration is that the list of values is known and is available in the Designer. The configuration itself uses the specific enumeration values.

Enumeration allows you to limit the number of possible options, for example, when entering a new document attribute. The list of enumeration values is created in configuration, meaning that you can organize verification of the chosen value and describe actions, which has to follow.

The Enumerations branch of configuration tree is designed to operate enumerations.

To edit an enumeration, create a list of enumeration values. The Enumeration object editing window is used to edit enumerations. When creating the new enumeration, the Use standard commands property is disabled.

On the Data tab, you can generate enumeration values.

Fig. 147. Adding an enumeration value

The name and synonym are specified in the property palette.

In 1C:Enterprise mode, each enumeration value in the value list is represented by a synonym. If the synonym is not specified, 1C:Enterprise uses its name.

In the example in fig. 147, the ProductTypes enumeration value will be represented as Goods (by the entered synonym).

On the Forms tab, you can create list and choice forms. This allows you to create various forms for selection (depending on the applied context). The list forms allowed to print enumeration lists. When creating the list form, the Use standard commands property is enabled automatically.

On the Templates tab, you can create printing templates.

<< Prev   Next >>

Icon/Social/001 Icon/Social/006 Icon/Social/005 Icon/Social/004 Icon/Social/002