Ideas.  Interesting.  Public catering.  Production.  Management.  Agriculture

1c general details in document forms. V8: History of changes to details. Property "Data separation" of the general attribute

The user's work with reference books and documents in 1C consists of filling out fields on the form.

1C details are directory and document fields that are displayed on the form for the user to fill out.

Let's take a closer look at the topic of details in 1C.

What are 1C Details

Each directory and 1C document consists of a set of fields. Such fields are called 1C details (for a 1C programmer).

In the configurator, in the 1C configuration tree, open any directory or document and you will see the Details branch. This is a list of directory details (fields).

Look how the same 1C details look on the 1C directory form.

Each 1C attribute has properties that indicate what type of value is stored in the attribute (string, number, etc.) and how the user will work with it.

Right-click on any 1C attribute and click Properties. A list of properties of the selected attribute will open in the window on the right.

Main properties of 1C details:

Standard 1C details

As you noticed, on the directory form there are 1C details that are not listed in the configurator: group, name, BIC.

The directory list form also contains 1C details that are not in the list: deletion mark.

These are standard 1C details. What it is? Everyone has a default set of 1C details. For directories this is, for example, code and name. For documents this is the date and number.

Standard 1C details can be viewed as follows:

  • Go to the editor of the 1C object (directory or document) by double-clicking on it with the mouse
  • In the editor that opens, select the Data tab
  • Here you can configure the standard details Code and Name of the directory
  • Click the 1C Standard Details button to view the full list.

General 1C details

Starting with version 1C 8.2.14, a new 1C Object has appeared in 1C - General 1C Details. Using it, you can add a property (field) that will be present in many directories and documents at once.

Properties of general 1C attributes:

  • Auto-use – adds general 1C details to all directories and documents at once
  • Composition - allows you to add general 1C details only to the necessary directories and documents (auto-use is then set to Do not use).

How to add 1C details

Right-click on the 1C Details branch of the desired directory and select Add.

We need to enter the Name of the 1C attribute, for example “Office Address” and the synonym “Office Address”. Leave the default type as String, but check the Unlimited length checkbox.

Let’s add another 1C attribute in the same way, only we’ll select the Boolean type and call it “Works on Weekends”.

How to display details on a 1C form (1C thick client)

Let's expand the Forms branch of the same directory. To open the form, select the element form and double-click on it with the mouse.

Drag the edge of the shape with your mouse and stretch it (optional).

In the configurator panel, click the “Data placement” button. You can also use the Form / Data Placement menu.

You see that our details are not displayed on the form. Check them. And also the Insert labels and Place automatically checkboxes.

How to display details on the 1C form (1C thin client)

Let's expand the Forms branch of the same directory. Select the shape of the element and double-click on it with the mouse.

On the Details tab, expand the Object line. You will see a list of details that were previously added to the directory.

Now just drag the required attribute from the right window to the left one and it will appear on the form.

Form 1C details

In the thick client, the form has its own details. They are located on the Details tab.

These details are not saved in the database, but they can be used on the form for the fields that are needed to work with the form.

For example, you added a checkmark to the form. When you click it, something happens on the form. The meaning of the checkbox does not matter to you (you do not need to write it down) - it is used only to switch the form when working with it. In this case, you do not use the directory attribute as data, but the form attribute.

Periodic details 1C

In 1C version 7.7 there were periodic details. Their meaning is this: the meaning of the props is different on different dates. For example, the value on September 1 is one, and on October 1, another. Same props.

In 1C 8 there are no periodic details. This is implemented as follows:

A common attribute is an attribute that is added to several configuration objects and can also be used as component special data separation mechanism:

  • Common props for several objects. An attribute that is present in several configuration objects in which this attribute retains its meaning and type. An example of such use: The “Organization” attribute in regulated accounting documents in an application solution
  • General attributes as an integral part of a special data separation mechanism. This mechanism allows you to divide the work of the application solution and all stored data into separate parts. In this case, data separation is enabled for the general attribute.
    Example of such use: In one physical information base Different “owners” of data work independently, and each user of such an application solution will only have access to his data

Property "Data separation" of the general attribute

If this property is set to "Do not use", then the created configuration object will be used only as an attribute included in several configuration objects.
If the property is set to "Separate", the common attribute will be used as the data separator

Composition of objects

The "Composition" property of a general attribute determines the list of configuration objects that include this general attribute.
If the "Auto-Use" property is set to "Do not use", the automatic addition of props will not occur, and to select objects in which you want to include common props, you should use the "Composition" property.
Also, the “Composition” property should be used if, when using the common attribute automatically, there are objects in which the common attribute should not be present.

Using common props

For each configuration object, the Usage column can take one of three values:
  • Automatically – means that the assignment of a configuration object to a general attribute depends on the value of the "Auto-Use" property
  • Use - means that the configuration object is part of the general attribute
  • Not used - means that the configuration object is not part of the general attribute
Thus, using the “Composition” property editor, you can selectively exclude some objects from the composition of the general props, despite the fact that “Auto-use” is set for it.

Configuration Objects

The general attribute (not in data sharing mode) may include the following configuration objects:
  • Directories
  • Documentation
  • Document logs
  • Characteristic type plans
  • Calculation type plans
  • Business processes
  • Tasks
  • Information registers
  • Accumulation registers
  • Accounting registers
  • Exchange plans
  • External data sources

Peculiarities

When recording a document, the general journal attribute is assigned the value of the general document attribute or the value NULL if the document is not part of the general attribute
General attributes can be used in data access restrictions. It makes sense to include external data sources as part of a common attribute when the common attribute is a separator.

ADVICE! You should not use general attributes to describe data that is part of the business logic of specific objects.

In 1s 7.7, directories had interesting details - periodic, they could remember the value of the details based on time, working with them was not very convenient, but, in the absence of alternatives, it was necessary. After switching to 8, many programmers were surprised to discover the absence of periodic details in reference books.

Typical tasks that are solved with the help of periodic information registers are the storage of time-bound information. The information can be heterogeneous, such as prices for items, positions held by an employee in different periods of time, and tax accounting parameters of the enterprise. In 8, the analogue of periodic details is the consolidated periodic registers.

In order to repeat the functionality of 7.7, you need to do the following:

Create a consolidated register “Periodical Data of the Counterparty”, indicate that this is a periodic register of information with a frequency of one day.

Now we need to add a type on the “Data” tab - the “Account” dimension, which coincides with the directory in which we want to implement functionality similar to the periodic details. In the “Details” branch we add those details that are time-bound. For the counterparty, this may be a legal and physical address, main telephone number, name of the manager, main fax, etc.

After saving the configuration, you can access the information register through the side menu (in managed application mode), see screenshot.

In normal application mode via the “Go” button

But if we look at the completed register, we will notice that it is quite difficult to understand what information is relevant, since we see the entire set of data as a whole, and not just the current one. this moment information.

When there is a lot of information and one can easily make a mistake, it is advisable to show current information in the counterparty’s card. Here you can’t do without programming.

First, let’s add a group to the form, which we’ll call “Contact Details” and add two details to it: “Manager” and “Telephone”


And in the form module, we will assign actions to obtain current data to the “On Opening” event:

& OnClient Opening Procedure (Refusal) //Insert in place of the collector data=RetrieveCurrentData(); attempt Director = dani. kerivnik; exception endtry ; attempt phone = data. telephone; exception endtry ; End of Procedure

The function for obtaining current data is as follows:

function OtrimatiCurrentData() //Insert in place of the collector //((QUERY_CONSTRUCTOR_WITH_RESULT_PROCESSING // Danish fragment of constructor prompts. // If you revise the constructor again, manually making changes will be lost!!! Request = New Request; Request. Text = " SELECT | Periodic Counterparty Data Summary of the Latest. Counterparty, | Periodic Counterparty Data Summary of the Latest. Kerivnyk, | Periodic Counterparty Data Summary of the Latest. Addresses, | Periodic Counterparty Data Summary of the Latest. Telephone |FROM | Register of Information. Periodic data of the Counterparty. Slice of the Latest AS Periodic Data of the CounterpartySlice of the Latest|WHERE | Periodic Counterparty Data Summary of the Latest. Counterparty = & Counterparty" ; Request. SetParameter(" Account ", object. Link); Result of Request = Request. Execute () ; SelectionDetailedRecords = Result of Request. Select(); data= new structure; While SelectionDetailedRecords. Next() Loop // Insert a selection sample SelectionDetailedRecords //SelectionDetailedRecords.Kerivnik; tribute Insert(" ker_vnik ", SelectionDetailedRecords. Kerіvnik) ; tribute Insert(" phone ", SelectDetailRecords. Phone) ; Report(SelectionDetailedRecords. Phone) ; EndCycle ; Return of tribute; //))CONSTRUCTOR_QUERY_WITH_RESULT_PROCESSING End of function

I used the request, although a less cumbersome construction can be used for these purposes:

selection = new structure; selection.Insert("Account",object); data = information registers.ContactInformation.GetLast(,selection); report(data.Kerivnik); report(data.Quantity());

Please note that in the function GetLatest two parameters are passed: point in time and selection, but if we need it at the current moment, then the first parameter can be omitted; in selection, the name of the key must match the value of the register dimension.

The main thing is not to forget to check the appropriate boxes in the register on the “Other” tab.

If you look at it, the periodic information register is a much more flexible tool compared to the periodic details in 7.7. It is widely used in typical configurations.

General details in 1C 8.3 is a platform metadata object that allows you to use one attribute for many configuration objects (directories, documents, charts of accounts, etc.). The object was created mainly to make the developer's work easier and to separate data.

General details were initially implemented in version 1C 7.7, but the developers did not immediately include it in the platform version 8. The mechanism of general details was introduced by 1C developers only in release 8.2.14.

It is very convenient to add general details so as not to change standard objects in the configuration; I often use them along with .

After adding a general attribute, it can be used in queries and displayed on the object form - Outwardly, it is no different from ordinary props.

The only limitation of general details is the inability to use them in .

Let's look at the basic settings and properties of general details that differ from other configuration objects:

Compound— a list of objects to which the general details will be used; the setting is reminiscent of setting up an exchange plan.

Get 267 video lessons on 1C for free:

Auto use— the setting determines whether general props will be used for those objects that have the “Automatic” usage mode specified.

Data separation— we will consider this setting separately.

Separation of data in 1C using common details

Data separation- a mechanism similar to the mechanism. However, the performance of this mechanism is more efficient and it is easier to configure.

The mechanism allows you to configure the display of only elements that the user can see. For example, you can distinguish between all objects (documents, directories, etc.) where a certain organization is installed.

Setting up data separation using general 1C details

To configure the general details, you need to specify the data separation - Divide. Immediately after clicking, the system will offer to create default accounting parameters:

In this case, it will be necessary to specify the session parameters when starting the system; how to do this was described with an example in the article.

This completes the setup - the user will only have access to the information that is specified in the selected session parameters.

Example of using common props

Let's look at setting up general props in 1C 8.3 using the example of a frame configuration and props Organization:

There are 3 documents in the system where it is necessary to indicate the details of the Organization: these are the Receipt Invoice, the Expenditure Invoice, and the Payroll.

The setup is simple:

  1. We create a new General attribute, specify the type - DirectoryLink.Organization.
  2. In the composition we arrange for our documents - Use.

That's it, the setup is complete!

Let's see the result:

The system displays general details “as if they were your own”: in requests, in form details, and in other places. This is such magic! 🙂

General requisites 1C 8.3 are not added

Loading...