ValueTable.FindRows

Syntax:

FindRows(<FilterParameters>)

Parameters:

<FilterParameters> (required)

Type: Structure.
Contains search criteria: the structure key defines the column to be searched, and the structure value defines the sought value.

Returned value:

Type: Array.
Array of values table rows that meet search criteria.
Note. The array stores references to values table rows, so if row is modified, the value in the array changes accordingly.

Description:

Searches for values table rows that meet specified search criteria.

Availability:

Server, thick client, external connection, Mobile application (server).

Note:

This method is effective for selecting non-unique values.

Example:

// EmployeesList - form attribute display information 
// about employeess (ValueTable type).
// There is a table box EmployeesList in a form. It displays
// EmployeesList data.
// Information on employees is selected using a query.
Query = New Query;
QueryText = 
    "SELECT
    // query text
    // ... 
    "
;
Query.Text = QueryText;
EmployeesList = Query.Execute().Unload();
Filter = New Structure();
Filter.Insert("PhysBody",Catalogs.PhysicalPersons.EmptyRef());
Rows = EmployeesList.FindRows(Filter);
If 
Rows.Count() > Then
    Controls.EmployeesList.CurrentRow = Rows[0];
EndIf
;


    

1C:Enterprise Developer's Community