Filter for Tabular Sections / ValueTable

The 1C:Enterprise developers forum

People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jul 31, 2014


How can I create a filter (e.g. that searches for a value in a specific column) for tabular sections or value tables via the 1C programming language? I know it is possible via the user interface (find or advanced search), but I need to change it dynamically in the background.

People who like this:0Yes/0No
Rating: 23
Joined: Oct 3, 2019

Hi Oliver,

yes it is possible.

Take a look at the example below:

suppose we have a document (screenshots 1 and 2).

This code sets a filter on the tabular section of this document:

Procedure Command(Command)

   structureFilter = New Structure;
   structureFilter.Insert("Product", "Product_2");

   Items.Products.RowFilter = New FixedStructure(structureFilter);

The result of the code in screenshot 3.

If we want to cancel the filter, then we need the following code:

Procedure Command1(Command)

   Items.Products.RowFilter = New FixedStructure();

Download scr_2.png (13.84 KB)
Download scr_3.png (18.23 KB)
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.