ValueTable

Collection elements:

ValueTableRow
Iteration through collection using For each ... In ... Do operator is available to object. Collection items are retrieved during iteration.
Access to collection item is possible using [...] operator. Row index (starting from 0) is passed as an argument.

Properties:

Columns
Indexes

Methods:

Add
ChooseRow
Clear
Copy
CopyColumns
Count
Delete
FillValues
Find
FindRows
Get
GroupBy
IndexOf
Insert
LoadColumn
Move
Sort
Total
UnloadColumn

Constructors:

Default

Description:

You can use a value table to store values in a tabular form. All main operations with a table are executed using this object. It allows you to manipulate rows of a value table and access column collection. Columns can be of different types (including multiple ones).

Availability:

Server, thick client, external connection, Mobile application (server).
Exchange with server is possible. Serializable. The given object may be serialized to/from XDTO. The XDTO type correspoding to this object is defined in {http://v8.1c.ru/8.1/data/core} namespace. XDTO type name: ValueTable.

Example:

// Create value table
ValueTable = New ValueTable;
// Add three columns into the value table
ValueTable.Columns.Add("Department",,"Department");
ValueTable.Columns.Add("Employee",,"Employee surname");
ValueTable.Columns.Add("Salary",,"Salary");

// Add  line
Str=ValueTable.Add();
Str.Department="Department 1";
Str.Employee="Greenhill";
Str.Salary=5600;

// Add column
ValueTable.Columns.Add("Seniority",,"Seniority");
// Add new row and data for it
CurStr = ValueTable.Add();
CurStr.Department = "Deaprtment 2";  CurStr.Employee = "Lennart";  
CurStr.Salary = 6700;  CurStr.Seniority = 22;


    

1C:Enterprise Developer's Community