ALM Open Test Architecture API Reference Version 12.55
Get the list of fields in a table and compare TDField properties and FieldProperty properties
Public Sub GetFields(Optional TableName As String = "ALERT")

' Get the list of fields in a table and compare 
' TDField properties and FieldProperty properties
    

Dim aField As TDField
Dim fieldList As List
Dim FieldProp As FieldProperty

'----------------------------------
'Get a list of TDField objects from
' TDConnection.Fields.
    'tdc is the global TDConnection object.
    Set fieldList = tdc.Fields(TableName)

'-------------------------------------------
' Use List.Count to check the number of items.
    Debug.Print "The number of field in the table is " _
        & fieldList.Count
    Debug.Print

'-------------------------------------------
' Use List.Item to get a TDField object.
' Use the TDField name property to check
' what the first item is.
    Set aField = fieldList.Item(0)
    Debug.Print "The first item is " & aField.name
    
' Walk through the list and output the properties.
'Note that although the TDField and the FieldProperty objects
' return information on the same field, they do this
' from different perspectives and, in some cases, the information
' is slightly different.
'Run the example and study the output to see these differences.
    For Each aField In fieldList
        With aField
'-------------------------------------------
' Get the FieldProperty object.
        Set FieldProp = aField.Property
        If True Then 'fieldProp.IsActive Then
            Debug.Print "---------------------------"
            Debug.Print "TDField.Name: " & .name
            'TDField.Name: AT_ENTITY_TYPE
            Debug.Print vbTab & "FieldProperty.DBColumnName: " _
                & FieldProp.DBColumnName
            '    FieldProperty.DBColumnName: AT_ENTITY_TYPE
            Debug.Print vbTab & "TDField.Property: " & .Property
            '    FieldProperty.UserLabel: Entity
            Debug.Print vbTab & "FieldProperty.UserLabel: " _
                & FieldProp.UserLabel
            '    FieldProperty.UserLabel: Entity
            Debug.Print vbTab & "TDField.Type: " & .Type _
                & " = " & DataTypeString(.Type)
            '    TDField.Type: 3 = TDOLE_STRING
            Debug.Print vbTab & "FieldProperty.DBColumnType: " _
                & FieldProp.DBColumnType
            '    FieldProperty.DBColumnType: char
            Debug.Print vbTab & "FieldProperty.UserColumnType: " _
                & FieldProp.UserColumnType
            '    FieldProperty.UserColumnType: char
            If FieldProp.IsKey Then
                  Debug.Print vbTab _
                    & "Key Field - FieldProperty.KeyOrder: " _
                    & FieldProp.KeyOrder
                  '    Key Field - FieldProperty.KeyOrder: 0
            End If
            Debug.Print vbTab & "This field" _
                & IIf(FieldProp.IsActive, " is ", " is not ") _
                & "visible in the UI"
            '    This field is not visible in the UI
        End If
        End With
    Next aField

End Sub