Working with Constants

Constants in the 1C:Enterprise system are generally used to store information that either does not change at all during the system's operation, or changes very rarely. The simplest example of this kind of information is the organization name.

Using constants is convenient because some information is entered once, and then can be reused many times to generate documents, perform calculations, and build report forms.

For example, the organization name can be entered in a specially declared constant, and the constant's name can be used in many different forms by calling its value (the name of the organization). If the organization name is changed in any way, it suffices to change it once, in the constant, and all changes will automatically be reflected anywhere the constant is used.

Constant Value Input Form

All work with constants is done in a special form.

The constant value input form is designed at the configuration development phase. The attribute set can also vary according to user rights. For each interface, a separate form can be defined.

Editing Constants

During a user session when the 1C:Enterprise program is in use, constant values only can be changed in the form. The addition of new constants, deletion of unneeded constants, and modification of short or long names of existing constants can be done only in the Designer.

To change the value of a constant, place the cursor in the form field containing the value to be changed, and enter the new value.

After necessary corrections have been made, they should be saved. To do so, click the OK, Save, or similar button (the available buttons and their names in the constant entry form are determined at the configuration phase).

After necessary corrections have been made, they should be saved. To do this, press the Save and Close, Save button.

1C:Enterprise Developer's Community