TableBoxColumns.Find

Syntax:

Find(<Description>)

Parameters:

<Description> (required)

Type: String.
Column name.

Returned value:

Type: TableBoxColumn; Undefined.
If there is no column with the specified name, the Undefined value is returned.

Description:

This may be used to execute a column search with a specified name.

Availability:

Thick client.

Example:

Function CompareTablesOfValues(VT1, VT2)
    If 
TypeOf(VT1) <> Type("ValueTable") OR 
        TypeOf(VT2) <> Type("ValueTable") Then
        Return False;
    EndIf
; 
    If 
VT1.Count() <> VT2.Count() Then
        Return False;
    EndIf
; 
    If 
VT1.Columns.Count() <> VT2.Columns.Count() Then
        Return False;
    EndIf
; 

    For 
each Column In VT1.Columns Do
        If VT2.Columns.Find(Column.Name) = Undefined Then
            Return False;
        EndIf
;
        For 
each TableRow In VT1 Do
            // compare rows of tables
            // ...
        EndDo; 
    EndDo
; 
    Return 
True;
EndFunction 
// CompareTablesOfValues(()


    

1C:Enterprise Developer's Community