Additional characteristics values ​​1c. Basics of organizing the accounting subsystem

Health 11.01.2024
Health

...Accounting for details is carried out in the context of characteristics and properties and must be implemented using a Plan of types of characteristics. A set of properties defines a characteristic. One part can have several different characteristics...

Solution

In essence, it is necessary to implement the following: create a subordinate directory “Nomenclature Characteristics” in the “Nomenclature” directory, and organize the ability for the latter to store the values ​​of the properties that define the characteristic.

1. Add the “Item Characteristics” directory to the configuration and subordinate it to the “Nomenclature” directory.

2. For the plan of types of characteristics “Properties of objects”, we define the “Type of value of characteristics”. Must contain all types of values ​​that various properties can take.

3. To store property values, we will create an information register “Object property values”.
Measurements:

  • Object, type “Directory.CharacteristicsNomenclature” (You can add other types; one directory is enough to solve this problem);
  • Property, type “Plan of Types of Characteristics.Properties of Objects”;
  • Value, type “Characteristic.Properties of Objects”, which is defined by the plan of types of characteristics “Properties of Objects”.

ATTENTION!!! Here you need to select not the type “Plan of Types of CharacteristicsLink.Properties of Objects”, but the type “Characteristics.Properties of Objects”.

4. To determine the type of the “Value” attribute depending on the type of the selected value of the “Property” attribute, fill in the “Relationship by type” property by specifying the “Property” attribute.

Bottom line

The problem is solved; while solving the problem, beauty creation is not considered (indicating the headings of forms of different entities, separating objects into subsystems, creating forms, checking data for correctness, forming the name of a characteristic depending on the property values).

After launching the developed application solution and entering the data, we obtain the necessary functionality

Plan of characteristics types in 1C 8.3 (PVC) is a metadata object designed to organize the storage of information about object properties and analytics. This implies that the developer does not know at the design stage what properties the user will want to use.

The key feature of PVC is the presence of two special details - Characteristic value type And .

There are a lot of examples of use in typical configurations: storing analytics, subconto (for), storing properties, various user rights.

Setting up and properties of the Characteristic Type Plan in 1C

Let's look at an example of use, configuration and basic properties of the plan of characteristics types using the example of the mechanism for additional information and configuration details Trade Management, edition 11.

Get 267 video lessons on 1C for free:

  • Characteristic value type— this attribute defines the set of possible data types available for setting the PVC value. UT 11 has a fairly decent list of such objects: nomenclature, projects, organization, partners, etc. Mandatory PVC props.
  • Additional stat values— a subordinate directory that stores arbitrary characteristics. For example, you can create a new property in the directory - size and assign it to the item.

Standard PVC details differ from regular directories only in the presence of the “Value Type” attribute. This is the prop that stores the property type:

This object of the 1C platform is interesting and useful when used correctly. Developers resort to it in cases where it is necessary to provide customers with the opportunity to independently regulate the list of properties of a particular entity. More often, such implementation methods can be seen in a company where in the future it is planned to increase the accounting parameters of something. Plans for types of characteristics are an excellent opportunity to make a customer happy with an unclear technical specification.

We create PVC in 1C

A distinctive feature of the “Plan of characteristics types” object is the ability of users to independently add accounting sections for directory elements in 1C. The developer only needs to configure the PVC once, and users will no longer bother him about adding directory characteristics. A plan of types of characteristics will help in situations where the customer’s employees do not have a clear definition regarding the properties of the elements taken into account, but the implementation has started.

Another situation where PVC would be the optimal solution is rechecking the elements indicating new properties. For example, in 1C they always added nomenclature by indicating only the name, but now they decided that it was necessary to indicate color, length and brand. Many people solve this situation using the “Comment” text field, where they enter all the information separated by commas. This path leads to the problem of making it more difficult to get the correct data from reports, as opposed to adding a characteristic type plan.

PVC is added through the configurator: in the object tree we find the branch “Plans of types of characteristics” and using the “Add” button we create a new element. We write down a name that reflects the entity, and using the “Characteristic value type” field we determine what types of values ​​our users will be able to specify. You can specify primitive types, directories, enumerations and other PVCs.

To be able to add various characteristics and qualities that are not in 1C, we need to add an additional directory subordinate to the created PVC. It will contain the values ​​of qualities that users will add to the plan of characteristic types. They will be tied to a specific quality, and company employees will not be able to select an inappropriate value.


After creating a subordinate directory in PVC, in the “Main” tab, you need to select it in the “Additional characteristics values” field. All that remains is to create a new information register, where all data on additional characteristics entered by users will be stored. This will be a non-periodic independent RS with the following fields (Data tab):

  1. Dimension "Nomenclature". Type – link to the corresponding directory, the “Leading” mark is required so that in 1C, when opening an item, the user can indicate additional indicators;
  2. Dimension “Property of Nomenclature”. Type – reference to the created PVC;
  3. Resource “NomenclaturePropertyValue”. Type – Characteristic.Nomenclature Property, in the “Link by Type” property we indicate Nomenclature Property. For the convenience of users, configure the associations of selection parameters by specifying selection by owner (Nomenclature Property).



After all the above settings, all that remains is to update the database, configure rights and launch 1C to check the functionality of the entire scheme. Having opened any item, we will see the name of our information register at the top in the form of a link. Clicking on it will open an empty table of the fields we created in the PC, with the ability to create records in it.


When created, 1C automatically fills in the nomenclature and prompts us to decide on the desired property and its value. Moreover, when choosing a property, if the list does not contain the characteristics of the nomenclature you need, you have the opportunity to add it to the PVC we created. When adding a new section, specify the name, value type and pay attention to the name of the created directory in the form of a link. If you click on it, you will see all the values ​​of this property included in the directory.



Let's create several entries in the directory for a new item characteristic. Please note that when added to the directory from this menu, the “Owner” field is automatically filled in with the item property we need. All that remains is to enter the value and write a new directory element. Having added all the necessary values ​​to the reference book, close the window and select the created item property.


When you try to select a value, 1C offers you only the data that you added specifically for the selected product quality. This will ensure that there are no user errors and will make working in 1C more convenient compared to when you had to choose from the entire list of values. Another useful limitation is provided by the 1C platform itself - it is impossible to add two identical properties of an item - an error will appear about an already existing record.


The number of characteristics is not limited, and even if 1C users add new properties every day, the above scheme will remain operational. A new directory may appear in the configuration and there will be a need to indicate its elements in the form of item property values. In such cases, you just need to go to the configurator and add a new object to the characteristic value types of the PVC we created. By updating the configuration, we will see that the problem is solved and users can use the data from the new directory.


Remember that now some elements of directories are used in the information register and when deleting, you must remove links to them. Otherwise, the platform's standard procedure for deleting objects will not be able to eliminate the directory element. If you nevertheless delete an object without searching for links to it, then instead you will see the message “Object not found”.

If someone wants to describe this or that material, we must provide him with some mechanism that allows him to create any characteristics and, most importantly, indicate what type of value these characteristics should have. Then, when setting values ​​for a certain material characteristic, the user will be able to select values ​​strictly in accordance with the specified type.

This ability to describe characteristics is precisely what the configuration object provides. Plan of characteristics types, which we will now get acquainted with.

Creating New Configuration Objects

1. Create a configuration object Directory With name OptionsNomenclatures and indicate that it will be subordinate to the directory.

2. Let's create another configuration object Directory With name .

3. After this, we will create a configuration object Plan types of characteristics With name PropertiesNomenclature. The type of the characteristic value will be set as follows:

  • Number, length 15, accuracy 3;
  • Line, length 25;
  • date;
  • Boolean O;
  • ReferenceLink.AdditionalPropertiesNomenclature.

4. Directory AdditionalPropertiesNomenclature indicate the owner → plan of types of characteristics PropertiesNomenclature.

5. On the bookmark Forms Let's set it to edit in the list.

6. After this we determine that additional stat values plans for types of characteristics will be located in the directory Additional PropertiesNomenk-latura.

7. On the bookmark Forms We indicate that this plan of characteristic types will be edited in the list.

8. Finally, let's create a configuration object Register of information With name Nomenclature Property Values.

9. Case changes:

  • Set of Properties, leading , type ;
  • ViewProperties, type Plan of Types of Characteristics Link. Properties of Nomenclature.

10. Register resource:

  • Meaning, type Characteristics.PropertiesNomenclature.

Note that we are able to define the type of a register resource value as Characteristic.<имя> . Essentially, this definition represents a composite data type as defined in the value type of the corresponding characteristic type plan. That is, a register resource can have a value of any type from those described in the value type of the characteristic type plan.

Finalization of the Nomenclature reference book

1. First of all, in the directory we need to provide the ability to edit a version of the material. To do this, we indicate that the directory will now be edited in both ways (on the tab Form) → in the list and in the dialog.

2. Let's create element's basic shape using the constructor.

3. Let’s slightly expand the form in width and height and add a panel to it: Form in†’ Insert Control in†’ Panel(from the top menu) or using the bottom menu icon Panel. Using the cursor that turns into a “cross”, we stretch the panel, getting the following picture and at the same time a window with a question:

If the question does not appear immediately, it will appear after we slightly change the position of any of the panel borders.

4. Let’s answer this question in the affirmative, and all controls will move to the added panel:

5. Now we will adjust the dimensions of the panel and add a new page to it. Adding a page → right-click context menu on the form field → Add page.

6. Set the name and title of the new page → Properties, and rename the first page to Basic and give it the same title. Names and titles are set in the panel properties palette in the properties group Current page:

7. After this, select all the controls located in the panel and execute the command Shape in†’ Centering in†’ Center vertically.

8. Now let's go to the page Properties and add a caption InscriptionOptionsNomenclatures with title Nomenclature options:. Let's specify the font style for it Fatty.

9. Under this inscription we will place a table field with a command panel. Let's give the field a name Options and type DirectoryList.OptionsNomenclature.

10. Remove the column from the table field Code.

11. For this table field Options set the property Link by owner → DirectoryObject.Link.

Setting this property provides us with the following: for the data source of this field → form attribute Options, having type Directory List.OptionsNomenclature, - the value of selection by owner will always be equal to the link to the edited directory element. In other words, the directory list contained in the form attribute Set of Properties, will always contain only elements subordinate to the edited directory element. And that means the table field Options, for which this attribute is a data source, will display only elements subordinate to the edited directory element.

12. Below we will place another inscription in the same way → CaptionValuesProperties with title Property values: and font style Fatty.

13. Below it we will place a table field with a command panel. Let's give the field a name Properties and type.

14. For the column Property set let's take down the flag Visibility, and for the input field in the column Meaning establish a connection by type Form Elements.Properties.CurrentData. ViewProperties.

A type relationship will ensure that we limit the type of values ​​entered into this input field to only the type of characteristic selected in the field Property type. However, by doing this we cannot in any way influence the value itself stored in this field. If you do not take any additional actions, then when you enter into the field Meaning it will not be possible to change the type of characteristic of any value.

If you select a different type of characteristic, there will be a mismatch between the type of value being stored and the type to which input in the control is limited. In this case, naturally, the system will prompt you to enter the type that has the stored value.

To avoid this situation, when changing the value in the field, Property type give field value Meaning to the type of characteristic selected in the field Property type.

15. Therefore, for the input field in the column Property type let's create an event handler When it changes:

16. Now we need to make sure that in the table field Properties information register entries were displayed that related only to the directory element selected in the upper table field OptionsNomenclatures.

Therefore for the table field Options: create an event handler for When a Row is Activated:

17. In addition, in order not to display the entire register when opening the form, we will create a form event handler WhenOpening containing the following text:

Finalization of the directory OptionsNomenclatures

Now we need to finalize the directory OptionsNomenclatures in such a way that the user has the opportunity to create new properties of materials not only when editing the material itself, but also in the process of entering documents, when a set of properties is selected in the tabular part.

1. Therefore, for the reference OptionsNomenclatures Let's indicate that it will be edited in both ways (both in the list and in the dialog).

2. Let's create it using the constructor element's basic shape .

3. In the form we will need to place table field , which should display existing entries in the property value information register for this directory element.

In the main form of the element we will place a table field with the name Properties, type Information RegisterList.Values ​​of Nomenclature Properties and command panel.

4. For the column Property set remove the visibility flag.

5. Then for the input field located in the column Meaning, let's set the connection by type Form Elements.Properties.CurrentData.ViewProperties.

6. For an input field located in a column Property type, let's create an event handler When it changes:

Now we need to make sure that when we open the form, the selection we need is installed. It is also necessary to ensure that when adding a new directory element, the selection is established after the element is recorded. To do this, we will use the assignment option data change event handler , which will track changes in the link to the edited directory element.

7. First of all, let's create an event handler WhenChangingLinks, in which we establish the selection we require:

8. Then add a call to this handler to the body of the form module:

9. And in conclusion, it is necessary to provide for the possibility that the user can begin to set new property values ​​without having yet written down the directory element itself Property Sets. Therefore, let's create a table field event handler BeforeBeginAdditions:

Finalization of the register of Remaining Materials

To ensure that materials are accounted for according to their characteristic values, it is necessary to change the structure of the accumulation register Remaining Materials and add a new dimension to it Set of Properties with type DirectoryLink.OptionsNomenclature.

Finalization of the document Receipt Invoice

The last thing left for us is to finalize the document Purchase Invoice. So that when goods arrive, the user can specify a set of properties for each incoming material.

1. Add a new attribute to the tabular part of the document Set of Properties with type DirectoryLink.OptionsNomenclature:

2. Place this attribute in the table field of the document form (right mouse button → Data placement):

3. For an input field located in a column Set of Properties, let's use the property again Link by owner →Form Elements.Materials.CurrentData.Ma-

terial. Now, when you select in this input field, a list of directory elements will always open OptionsNomenclatures, subordinate to the material selected in the column Material.

4. In conclusion, we will open the procedure for processing the posting in the document module and add to the generated movements the assignment of a value to the dimension Set of Properties:

Now let's launch 1C:Enterprise in debug mode and create several sets of properties for our materials.

Creating Property Sets

1. Open the directory element Nomenclature → Electric cable.

2. Let's go to the bookmark Properties and create a set of properties for this element called White.

3. Then we will create a set of properties for the directory element Nomenclature → Rubber hose. This set of properties will be called Poland and consist of the following characteristics:

  • Color → Chain;
  • Manufacturer → Fagumit.

4. Now let's open the document Receipt invoice No.–2 and indicate that 2 white electrical cables and a Polish rubber hose were purchased.

5. Then copy the first line of the document and indicate that 3 black electrical cables were also purchased. During the input process we will have to create another set of properties for the electrical cable → Black, which one:

  • Color → Black;
  • Section → 2.5.

6. Let’s check the document and look at the document’s movements in the register Remaining Materials:

7. In addition, let's look at the entries contained in the information register Nomenclature Property Values:

Report of Material Remains by Properties

To complete the picture, we will create a report that will show us the availability of materials with certain properties.

When creating this report, we use the capabilities that the data composition system provides us with to work with characteristics.

1. Create a new configuration object Report with the name Remaining MaterialsBy Properties.

2. Open the data composition schema designer, add a new Dataset → query and let's start constructing the request.

3. Select the virtual table of the accumulation register Remains of Materials. Remains and About the Company.

4. From the virtual table of the accumulation register Remaining Materials. Remainings and Turnovers select the following fields:

  • Material;
  • PropertySet;
  • QuantityInitialRemaining;
  • QuantityIncoming;
  • QuantityConsumption;
  • QuantityFinalRemaining.

5. After that, on the tab Unions/Aliases let's set aliases for numeric fields without a word Quantity:

6. Let's start describing the characteristics. To do this, go to the bookmark Characteristics.

Click on the button Add and let's start describing the fields.

7. The first field that needs to be described is Value type. Here we should indicate the type of the field to which our characteristics will relate. In our case, such a field is the field Set of Properties register Remaining Materials. Therefore, we will choose as the value type DirectoryLink.OptionsNomenclature.

8. The next step is to describe where the data composition system should obtain the list of characteristics. To do this, you should indicate the source of the list of characteristics and describe the purpose of specific fields of this source.

As a source, the data composition system can use either an existing source data table or the result of some query on the tables. In our case, everything is quite simple: the list of all characteristics is stored in terms of types of characteristics PropertiesNomenclature. Therefore, we will indicate as a source Table, and in the field List of characteristics let's choose Plan of Types of Characteristics. PropertiesNomenclature.

9. Next, you should describe the purpose of the fields of the source that “supplies” the list of characteristics. In field Identifier let's choose Link, in field Name → Title, and in the field Type → ValueType.

10. Let's move on to describing the source of characteristic values. In our case, the source of characteristic values ​​is the information register Nomenclature Property Values, so in the field Source we choose Table, and in the field Characteristics valueInformation Register.Values ​​of Nomenclature Properties.

11. Next, we will describe the purpose of the register fields. In field An object select a dimension Set of Properties, in field Identifier → ViewProperties, and in the field Meaning→ register resource Meaning:

12. This completes the creation of the request. Click OK and look at the request text generated for the data composition scheme:

13. Notable in this query is the section starting with the keyword CHARACTERISTICS. It describes exactly the characteristics of the data composition system that will be used in this report.

The text of this section is contained in braces . This means that it is not part of the query, but rather an instruction to the data composition system.

14. Let's start editing the data layout diagram. First of all, on the tab Resources select all available resources:

15. Let's go to the bookmark Settings. Let's create a report structure → add a grouping Detailed entries.

16. Then on the bookmark Selected fields Let's select the fields that will be displayed in the report:

  • Material;
  • PropertySet;
  • InitialRemaining;
  • Coming;
  • Consumption;
  • FinalRemaining.

17. In conclusion, let's go to the bookmark Other settings and set the report title → .

18. This completes the creation of the report. Let's launch 1C:Enterprise in debug mode and see what results can be obtained using our report. Let's open the report Remaining materials by properties.

19. First, let's see what materials we have with a cross section of 2.5 mm2. To do this, click Settings, let's go to the bookmark Selection and open the thread Property set.

Please note that the fields that exist in the directory OptionsNomenk-latura, the data composition system added all the characteristics that we defined for the various sets of properties in the database: Manufacturer, Color and Section. Thus, selection in a report based on the values ​​of any characteristics is quite simple and intuitive.

20. To find out what materials we have with a cross-section of 2.5 mm2, just select the Section, mm2 field and set the equality condition to 2.5 for it.

21. When the report is completed, we will get the following result:

22. Then let's see what black materials we have:

23. And finally, to make sure that the report works correctly, let’s see how many black electrical cables we have:

Thus, you are convinced that when using this logical diagram, we now have the opportunity to keep track of materials in an arbitrary number of sections of properties and their values.

It should be noted that the example we considered is not a complete solution for this configuration. We just demonstrated the possibility of maintaining such records. In order for our configuration to fully use the properties of materials, it is necessary to make appropriate changes to the remaining registers, documents and some reports.


They find us: plan of characteristics types, obtaining data from a characteristic type plan.

We recommend reading

Top