ListFieldComputed Object


Contains information about fields created automatically by the computer. The ListFieldComputed object cannot be created by the user and instead is used by Microsoft FrontPage to create a reference from the list to a page in the Web site. For example, in many lists, the Title field is created by the computer and is used to reference the page corresponding to the list field.
This object is supported only by Web pages or sites that are based on Microsoft SharePoint Services.
Using the ListFieldComputed object
Use ListFields.Item (index) to return a ListFieldComputed object, where index is either the name of the field or its numeric position within the collection. The following example displays the names of all computed fields in the current list.
Sub ListComputedFields()
'Display the names of computed fields in the current list
Dim objApp As FrontPage.Application
Dim objField As ListField
Dim strType As String
Set objApp = FrontPage.Application
If Not ActiveWeb.Lists Is Nothing Then
For Each objField In objApp.ActiveWeb.Lists.Item(0).Fields
'Check if it is a computed field
If objField.Type = fpFieldComputed Then
If strType = "" Then
'Create new string
strType = objField.Name & vbCr
Else
'Add next field name to string
strType = strType & objField.Name & vbCr
End If
End If
Next objField
MsgBox "The names of the fields in this list are: " & _
vbCr & strType
Else
'Otherwise display message to user
MsgBox "The current web site contains no lists."
End If
End Sub