GetFolderSearchFieldName method
This method is intended for use with Visual Basic.
- Method:
- short GetFolderSearchFieldName(
- Parameters:
- Index
- Specifies the zero-based index of the name to be returned. It must be a number greater than or equal to zero and less than the value returned by GetNumFolderSearchFields.
- pName
- Points to a BSTR to receive the name of the field.
- Description
- The specified field name is returned in pName.
GetFolderSearchFieldName or GetFolderSearchFieldNames can be used to retrieve the folder search field names. An application should use the one which is more convenient in its environment.
- Return Value
- Refer to return codes.
- See Also
- GetNumFolderSearchFields, GetFolderSearchFieldNames, SetFolderSearchFieldData, and SearchFolder
Visual Basic
Dim rc, count, i, j As Integer
Dim num_fields, num_docs As Variant
Dim Names() As String
Dim Line As String
Dim Temp As String
Dim Oprs As Variant
.
.
.
Oprs = Array ("Equal", "Not Equal", ..., "Like", "Not Like")
rc = ArsOle.GetNumFolderSearchFields(num_fields)
If rc <> ARS_OLE_RC_SUCCESS Then
MsgBox "ERROR"
End
End If
ReDim Names(num_fields -1)
For count = 0 To num_fields -1
rc = ArsOle.GetFolderSearchFieldName(count, Temp)
Names(count) = Temp
Next count
for count = 0 To num_fields -1
lbFieldList.AddItem Names(count)
Next count
for count = 0 To UBound(Oprs)
lbOprList.AddItem (Oprs(count))
Next count
.
.
.
' During SET FIELD button processing
rc = ArsOle.SetFolderSearchFieldData (lbFieldList.List(lbFieldList.ListIndex),
lbOprList.ListIndex,
txtValue1.Value,
txtValue2.Value)
If rc <> ARS_OLE_RC_SUCCESS Then
MsgBox "ERROR"
End
End If
'During OK button processing:
rc = ArsOle.SearchFolder (False)
If rc <> ARS_OLE_RC_SUCCESS Then
MsgBox "ERROR"
End
End If