1c change the values ​​of the dynamic list.

During the process of further processing the skin configuration, the 1C program encounters dynamic lists.
A dynamic list is an interface object that is used to display various lists of database objects or non-object data – registry entries.
For example, dynamic list Use vikoryst to display the list of nomenclature:

To demonstrate the capabilities of a dynamic list, we can create external processing Dodamo basic form. A new detail with the “Dynamic list” type has been added to the form. Let's go to these authorities and marvel at what's there.
We are tsked by the authorities, “The happy drink.” This inclusion will demonstrate to us the power of a dynamic list. We can write a query, vikorily and practically all the possibilities of your queries in the 1C system: Entrepreneurship. We establish the order and press the message “Vidkriti”:

Our list displays a list of items with surplus in all warehouses. To implement such a list, add the following command:


As the main table, select “Dovdnik.Nomenclature”, which allows us to work with the dynamic list, as with the list of nomenclature - add, change, mark selected elements of the dvdnik. Also, setting up the main table makes it possible to dynamically read data - this means that the selection will be carried out in portions, as needed.
Next you need to create form elements for our list:

If we try to run our process in this form, then we remove the error:


To remove this, you must set the “Period” parameter. To do this, you can quickly use the “Set Parameter Values” method in the “Parameters” collection of the dynamic list. The method accepts two parameters:
. "Parameter" - Type: Row; Data Layout Parameter. The name of the parameter or data composition parameter whose value needs to be set;
. "Value" - Type: Additional. Significance, which is necessary to install.
You can click in the “When created on the server” form:

Do you have a diet and need help from a consultant?


It is possible for us to change the period for removing surpluses. For this, add the details and associate the “Date” form element with it:


The “Change” function of the “Date” form element has a “SetParameterValue” method, passing the value of the associated attribute. Using a similar procedure, we can change the procedure “When created on the server” of the form. As long as the method is available on the client, calling the server will not be necessary:


Now, when you change the date, the surplus will be automatically updated:




It is acceptable that investors want to earn either surplus or planned expenses. Let's look at one of the implementation options. Dodamo props form a boolean type and connect with it a remix:


When changing the value of the jumper, the text will be changed. For this purpose, the quick sampler of the “When Changing” form element “Display the strength of the step”. We need to change the power of the text of the dynamic list entry in the position of the value of the details. Since this power is not available on the client, the server procedure needs to be called:


The result of the changes made:



Headline For the emerging consumers, we need to program

This is a form to contain a dynamic list with a prefix. How can I set the required parameters for the request when the form is open?

One of the settings that appears when the form is opened, you can refer to the fact that the dynamic list of the form that is opened, place a further entry in the parameters. And when you open such a form, you need to pass specific parameter values ​​to this list.

This task lies behind the help of the creation additional parameters forms, passing the necessary values ​​into them and setting them in the parameters and entering them into the form collector When created on the server.

It is acceptable that there is a register of Product Prices. The form of the list of this register contains a dynamic list with a prefix:

VIBRATE Register of Approved Prices of Products.Period, Register of Approved Prices of Products.Product, Register of Approved Prices of Products.Price With RegisterHouse. Period and register of product price statements.<= &КонецПериода

As you can see from the text, the query contains three parameters: Product, Ear of Period and End of Period. For the normal functioning of the form, the values ​​of these parameters must be set within the hour of opening the form, otherwise, as a result of opening the form, the seal will be removed.

To transfer important parameters to the form, you must create them in the form editor.

It may seem like a joke, but it’s not a big deal. Any parameters passed to the OpenForm() function will be available in the form's handler When created on the server. But it’s still better to create them in a form that is clearly visible.

First of all, the form module will not have the opportunity to check and find out such parameters. And in another way, the obvious creation of form parameters facilitates the encouragement of applied solutions by those developers who took their part from the creation.

Now, we can create three parameters in the form of the register list: Start of Period, End of Period (type Date) and Product (type) DovidnikPosilannya.Products).

Now, in the form of the product indicator element, we create the command Prices for breastfeeding with the following text:

ParameterForm = New Structure("CobPeriod, EndPeriod, Product", "20121201000000", "20121231235959", Object.Posylannya); OpenForm("ViewRegister.ProductPrices.Form.ListForm", ParametersForm);

With this command we open the list form to the information register and transfer the values ​​of three parameters to it.

At the very form of the register of statements, at the collector of the same form When created on the server, settable values ​​are passed as parameters for supplying the dynamic list with the following order:

&OnServer Procedure When CreatedOnServer(View, StandardProcessing) List.Parameters.SetParameterValue("CobPeriod", Parameters.CobPeriod); List.Parameters.SetParameterValue("EndPeriod", Parameters.EndPeriod); List.Parameter.SetParameterValue("Product", Parameter.Product); KinetsProcedures

The dream of some kind of “family man” was born. As often as not, users of programs 7.7 asked for a normal selection of nomenclature. So that the excess can be drained, priced, and filters installed. I had to figure out all sorts of tricks, right up to the writing of external components. 1C 8.2 introduced dynamic lists. I’d like to take a look at what this is and what the smell can be in 1C 8.3.

Let's take the following 1C test configuration as a basis: "Business Accounting 3.0". We won’t work on the selection at once, we’ll just add one more selection form to the “Nomenclature” adviser and select the main one:

When the system is completed, add a field of the “Dynamic list” type to the table form.

Let's go to these authorities and marvel at what's there.

The ensign tsked in front of us, “Good drink.” This will show us all the advantages of a dynamic list. We now have the opportunity to write a simple command with parameters. We establish the order and press the message “Vidkriti”:

A window with the prepared code will open. In fact, all the fields of the “Nomenclature” adviser have simply been redrawn.

Watch 267 video lessons from 1C free of charge:

As a matter of fact, there is a button on the “ ” button that allows you to dynamically change the list. So, if another client changes something with the agent, our list can change. In addition, there is a “Customization” tab, and we will refer to it later.

Powerful request to the dynamic list

From now on, we will immediately need the solution from surpluses and prices. Something like this:

Bookmark “Nashtuvannya”

The first axis is now the tastiest! Let's go to the "Nashtuvannya" tab. And it is immediately important that on the first deposit we can work in any selection from any field in the entry:

Program for setting parameters in the dynamic list 1C 8.3

Don’t forget that we have two parameters for the entry: “Period” and “Price type”. It is our fault to pass them on, otherwise there will be a pardon.

We will write these parameters in the form parameters, and in the form module we will add the following rows:

&On the Server Procedure When Created on the Server (View, StandardProcessing) List. Parameters SetParameterValue("Period", Parameter. Date) ; List. Parameters SetParameterValue("PriceType", Parameter.PriceType) ; KinetsProcedures