Hello dear readers, today the idea came to talk about 1C registers. Yes, I haven’t written about reference books or documents yet, but we’ll look at that later.

Now let’s look at the purpose of registers, types of registers, depict how registers are designed, and talk about their design and data storage.

Purpose of registers

Registers are intended to increase the speed of reading certain (analytical) indicators on the activities of the enterprise. Indicators are stored in registers in certain sections, taking into account frequency. Those. registers store time, for example, you can find out the stock balance of a certain product a month ago.

Register— a structure of a certain type that allows you to receive data at the same speed, regardless of the size of the database; without them, the output of the result will be slow.

Scheme of using registers in 1C:Enterprise
Documents => Registers => Reports

From the diagram you can see that registers are the basis for reports, and data is added to registers only when posting documents.

Types of analytical indicators

Registers are designed to store various indicators:
ACCUMULATION INDICATORS: Balances and Turnovers. Accumulation registers are designed to record them.

  • Accumulation register(residual). Increases upon receipt and decreases upon sale. At each point in time, the register must remember the balance of a given product.

Some indicators can only grow in one direction (reversible indicator).

  • Accumulation register(reverse). For example, sales data (there cannot be negative sales). If the product is returned, it will be registered with a negative sign.

CONDITION INDICATORS, a characteristic of an object, a register of information is intended.

  • Register of information, has absolutely any data type. This value is valid until the next state change.

There are other types of registers: Accounting registers, Calculations.

Register image

The indicators that are stored in the register are called resources. Analytical sections - measurements.
Key register task– storage of indicators in terms of measurements and time

If you imagine the register as a coordinate system, you get:
Axes - Register Dimensions
Separate axis for change over time
Indicators at the intersection - resources

As an example, the figure shows the storage of goods in warehouses

The number of dimensions in the register can be quite large. In this case, the register can be presented in the form of a table, where each column corresponds to a dimension and there are also columns with resources.

Register: Remaining goods
Dimensions: Product, Warehouse
Resources: Quantity, Cost

Register design

The redundant structure of the register leads to an increase in the volume of the database, the time required to write to the register increases (documents take longer to process), and the complexity of development increases. The register structure must be determined immediately, because changing it in the future is a very complex process.

When determining measurements It is recommended to specify a reference data type (for directories, documents, enumerations). Order measurements affects the speed of receiving data from the register. Therefore, when designing a register, it is important to understand how often the user will receive balances for each dimension. All measurements are in order.

Resources— numerical data that characterize certain indicators (the information register resource can have any type of data). Resources represent values ​​that are stored at the intersection of a dimension.

Props— some additional characteristic of the register that is not displayed when receiving totals. Register details can have any data type.

Storing data in registers

Registers can be represented by one or more tables. The composition of the tables depends on the register properties. There are no classes such as RegisterReference or RegisterObject for working with registers, because the register storage structure is different from object tables. Information is stored in the form of records. A register entry cannot be marked for deletion.

You can view the contents of the register in user mode using the main menu button “All functions”.

This is the end of this short review. 1C registers if you have any suggestions, additions then write in the comments.

1C Programmer was with you, I’ll help you with .

P.S. The girl is dancing

There are several types of registers in 1C:

  • Accumulations that store balances or turnover in numerical form;
  • Calculations that store calculation types and calculations themselves are typically used for payroll calculations;
  • Accounting records with data on accounting calculations in the form of Dt-Kt;
  • Information registers.

We will dwell on the latter in more detail, since they allow us to compile data from the database by measurement sections. For example, “Price Nomenclature” stores data for a specific item and characteristics for a certain type of price.

Fig. 1 “Price nomenclature” register

Characteristics

The register can be either periodic or non-periodic, when there is no need to save the sequence of changes. But if you still need to store it, then it is determined within what period the program will establish control over the uniqueness of records: per second, per day, per month, per quarter and per year.


Fig.2 Frequency and recording mode

If you try to create two records within the same period, the program will generate the error “A record with such key fields exists!” and will not allow you to write to the database.

You can also specify the recording mode. The first is with “Submission to the registrar”, in which records will be recorded by documents and in each of them the registrar document will be indicated. If you choose the second - independent mode, then the data is not recorded by the recorder, but is added, for example, directly from the list or as processing.


Fig.3 Recording modes

The peculiarity of the periodic register is that you can use a slice of the last or first ones, obtaining ready-made values ​​from the database about the last/first set value for a certain date.

Entry into the 1C information register

Rows in a register with a period and a recorder containing information about resources in terms of dimensions are called records.

To add a record to a register, either a record manager or a record set is used. If the entries in the registry have a common key, then you must use a RecordSet. And to record one single record, if all records in the register are unique, you must use the Record Manager.

An example of a record when using the Information RegisterRecordSet object.

Using the recording manager:

NewRecord = Information Registers.Currency Rates.CreateRecordManager(); NewRecord.Currency = Directories.Currencies.FindByName("USD"); NewRecord.Period = Date(31,12,2016); NewRecord.Course = 100; NewRecord.Multiplicity = 1; NewRecord.Write();

When you use a recordset and the Write method, a record is written to the recordset's information register. In this case, either simply adding lines or replacing existing lines in the register can occur. For independent registers, without setting selections, all entries in the register will be deleted and replaced with added entries.

If you write data into a subordinate register without selecting it, an error will occur.

An example of a record using a set of records in the PriceNomenclature information register subordinate to the registrar:

NewRecordSet = Information Registers.Nomenclature Prices.CreateRecordSet(); NewRecordSet.Selection.Register.Set(Link); NewRecordSet = NewRecordSet.Add(); NewDialRecord.Period = Link.Date; NewSetRecord.Nomenclature = Link.Nomenclature; NewSetRecord.Price = Link.Price; NewRecordSet.Write();

An example of a recording through the recording manager:

Record = Information Registers.Currency Rates.CreateRecordManager(); Record.Period = Date; Entry.Course = Course; Record.Currency = Currency; Write.Write();

Search and read information register

To find an entry in the information register and read it, you need the help of queries. For example, we need to get prices entered by a certain registrar:

SELECT Nomenclature Prices.Nomenclature, Nomenclature Prices.Price FROM Register Information.Nomenclature Prices HOW Nomenclature Prices WHERE Nomenclature Prices.Registrar = &Registrar

Changing and deleting entries

To delete an information register entry, for example all EUR exchange rates, use the following code:

Selection Structure = new Structure("Currency", Directories.Currencies.FindByName("EUR")); Selection = Information Registers.Currency Rates.Select(,Selection Structure); While Select.Next() LoopRecordManager = Select.GetRecordManager(); Select.GetRecordManager().Delete(); EndCycle;

To quickly and completely clear the register, you can use the following code:

NewRecord = InformationRegisters.TestRegister.CreateRecordSet(); NewRecord.Write();

To adjust and change the register, as well as quickly fill the register with data, you can write a universal processing.

6
You can read information register entries in two ways: Through a Set of Records or Manager Here is an example through a set of records: // Adding new data to an existing information register entry Set of Records = Information Registers.Document Circulation.Creation 2
On the Client Procedure ProductNomenclatureWhenChanged(Element) TabularPart Row = ThisForm.CurrentElement.CurrentData; Nomenclature = TabularPartString.Nomenclature; PriceType = ThisForm.PriceType; TechDate = Object.Date; RowTabularPart 2
Development of any configuration will require the use of information registers! To simplify writing and reading data in the information register, you can use universal functions: // Adds one entry to the information register based on the passed values 1
The BeforeWrite event occurs before the information register set is written. The handler procedure is called after the start of the write transaction, but before the start of writing the information register set. An example of checking a condition and filling in the Color attribute

1C information registers it is a structured set of data with dimensions and resources. Designed to store periodic information.

Periodicity

Information is stored by dimension and period. You can set the frequency of the information register:

  • Non-periodic
  • by registrar
  • second
  • week
  • month
  • quarter

Frequency is needed to select information from the register for a certain period of time. If you specify a frequency, entries in the register will be made with the period when the entry was made. Let’s say if you look at the “Item Prices” register, you can see the history of price changes, with what measurements and in what period of time the entry was made.

Periodicity in information registers is needed for information that changes over time, for example: exchange rates, product prices, product discounts and markups, etc.

Registrars

If you make an entry into the information register using a document, you need to set the entry mode: “Submission to the registrar” and select the document with which the entry will be made in the register. Then the “Registrar” field will appear in the register, where information will be stored on what document the entry was made with. The recorder can also be used as a period; to do this, indicate in the “Frequency” field - “By recorder”. Subordination to the registrar is done when it is necessary to strictly link a register to a document and changing entries in the register manually becomes unavailable.

There may be several documents that will act as registrars. In order to add a registrar, you need to go to the properties of the desired information register, go to the “Registrars” tab and check the boxes next to the documents that will act as a registrar.

You can see the movements the recorder makes from the document. To do this, you need to go to the document you are interested in, click: Go – Document movements by the registrar.

Don’t forget to add rights in the registry properties; they can be assigned on the “Rights” tab. Then in the list of roles you need to select the role to which you want to add rights to the register and in the list of rights set the rights to for the selected role.

Uniqueness of records

The uniqueness of a record depends on the period and measurements. For example, if you want to write a record with the same measurements in the “Item Prices” register on the same day, then you will not be able to do this and the program will cause an error, since the periodicity of the register is within a day.

If the frequency is set by the registrar, it also participates in the uniqueness of the record.

For non-periodic and independent registers, uniqueness depends on the combination of dimensions.

Forms

To view records, use the list form, in it you can set the selection according to the fields you are interested in, view the history of records and change them through the record form. You can view register entries as follows: in the top menu, click the “Operations” - “Information Registers” button. In the window that opens, select the register you need. After this, a list form will open in the form of a table, where each entry is a unique entry.

To edit/create, use the record form; if the record is subordinate to the registrar, then the field will not be available and the form cannot be created.

You need to add forms in the configurator by going to the information register, in the “Forms” tab and clicking on the “magnifying glass” next to the desired type of form. Next, a window will open where you can configure the fields of the future form (location, names and specify functionality).


Dimensions, resources and details

Dimensions are intended to form the uniqueness of a record; in the future, you can select them and make a cut based on a specific dimension. The combination of measurements forms the record key. It's better not to create large number measurements so that the table does not grow and does not slow down while working with it.

Dimensions have a “Leading” checkbox; if it is checked, the record will be stored in the database as long as this dimension exists. Several leading measurements can be made. For example, in the information register “Item prices”, the leading dimension is the item; if you delete an item that is included in the record, then the entry in the information register for this item will be automatically deleted.

Resources are designed to store summary information: quantity, price, etc. In the future, we will receive resources for a certain period of time (if the register is periodic), according to measurements.

Details, in most cases, are intended for storage additional information, they do not take part in the uniqueness of the record. For example, you can enter information such as author, comment, etc. into the details.

You can perform the following actions with the information register:

  • Deleting an entry in the 1C information register

Peculiarities

— Uniqueness of records based on a set of dimensions: each record in the information register is a new resource value.

— Entries in the information register can be either periodic or not.

— The information register can be dependent and independent of the registrar.

— It is possible to make a cross-section of the first and last records for the desired date. This is implemented by virtual tables: “Slice of the First” and “Slice of the Last”. To use these tables, you can use both selection and query (in the query designer you will select these virtual tables and you can make a query on them). These tables will be available if the information register is periodic.

The “Item Prices” register is a periodic register of information, entries are made according to the registrar.

The image shows that the frequency is set to within a day. This means that the price can be changed once a day based on measurements unique during the day.

The register is subordinated to the document “Setting item prices”. This means that the entry into the register comes from this document. Movements on a specific document can be viewed from the document form “Setting item prices”.

The register is designed to store information on the price of an item, with the dimensions “Price type”, “Item” and “Item characteristics”. The leading dimension is all three dimension fields; it will be possible to make selections based on it when sampling.

Conclusion: After reading the article, you will be able to create a 1C information register, add dimensions and resources, configure editing and list forms. Create a record and select existing records. If you have any questions, use the comments in the article, I will try to quickly answer your question.

For example, let's assume that the data will be taken from documents. In this case, every time when forming any the program would need a report go through all documents, extract data from them and only then, based on this data, create the requested report.

Obviously, such an approach to generating reports would be ineffective. Therefore, in practice, there is such a thing as holding a document. When posting a document (as opposed to simply recording it in the 1C database), based on the 1C form filled out by the user, Accounting creates so-called postings, that is, it makes one or more entries in one or more registers.

1C registers are simply tables containing columns and rows. The principle is the same as with Excel tables or regular “paper” tables.

The movement of a document through registers is the entries made by a document into registers when posted, called.

It is from these registers that data is taken when generating various reports. This much faster than going through all the documents. It is for this reason that you should always be careful not only when filling out the document form, but also, if necessary, control the transactions generated by the document.

There was an important part of the article, but without JavaScript it is not visible!

Types of 1C Accounting registers

In fact, registers in 1C: Accounting are used not only for storing document postings, but also for various other purposes. In this regard, there are several species registers:

  • Information registers
  • Accumulation registers
  • Calculation registers
  • Accounting registers

The last type of register stores the accounting entries of documents. How all these differ from each other and why, I tell you in the course I teach, Enterprise Accounting 8. Here I will give again a list of existing 1C registers, only in the form of a screenshot (using the example of 1C Accounting 8.2).


But the same thing using the example of 1C: Accounting 8.3:

website_

Viewing 1C Accounting registers

It never hurts to know where exactly certain registers are located in the program and why each of them is needed. Well, at least because one day ( and very easily!) you may need to review them in order to find and correct errors in accounting (a typical task when closing a month).

Any of the registers can be opened using the forms I provided above. That is, from general list registers of a certain type. As an example, I will give the most famous register - the accounting register. However, this name is more technical, since for the user it is called Posting journal.

website_

When you open any register, the data there is displayed "in the shared heap". They can be filtered according to the parameters you need in exactly the same way as you can do with documents.

Making changes to registers

If you take another look at the fragment of the contents of the 1C Enterprise accounting register in the figure above, you will notice the absence of a button Add. The point is that Not all registers can be entered directly, i.e. open it and add elements (rows) manually, as you can do with documents or reference books.

A quick question: did you know that in some directories you also cannot enter data through everyone’s favorite “Add” button. Why do you think?

Here is an example of a simple information register into which entries can be made manually. Using such registers is, of course, easier.

website_

If there is no button in the register Add, then data in such registers is entered only by so-called registrars. The meaning of the concept of a registrar is illustrated by the same picture with the form of an accounting register.

Let's sum it up

1C Accounting registers store data that is no less important than that recorded in document forms. It is very important to be able to work correctly with various registers - this helps to understand whether the program is doing everything correctly (in accordance with your needs). All this also helps to correct accounting errors.

I discuss the features of different registers, entering data into them, types of registrars, the difference between periodic and non-periodic registers, and much more in my course 1C: Accounting 8, presented on this site.