M-Files API 23.11.13135.0
TemporarySearchView Object
Members 
Description
The TemporarySearchView class represents a temporary search view.
Public Methods
Creates a copy of the object.
Public Properties
The search criteria of the view.
Encapsulated view object.
Remarks
The temporary search view behaves like the quick search result set in the M-Files user interface. The temporary search is removed automatically when M-Files restarts.
Example
' Create the view object.
Dim oViewNew As New MFilesAPI.View
oViewNew.Name = "Test view"

' Create the search criteria for the view.
Dim oSc As New MFilesAPI.SearchCriteria
oSc.FullTextSearchString = "demo*"
oSc.FullTextSearchFlags = MFilesAPI.MFFullTextSearchFlags.MFFullTextSearchFlagsStemming Or _
    MFilesAPI.MFFullTextSearchFlags.MFFullTextSearchFlagsLookInMetaData Or _
    MFilesAPI.MFFullTextSearchFlags.MFFullTextSearchFlagsLookInFileData Or _
    MFilesAPI.MFFullTextSearchFlags.MFFullTextSearchFlagsTypeAllWords
oSc.SearchFlags = MFilesAPI.MFSearchFlags.MFSearchFlagNone
oSc.ExpandUI = True

' Create the "not deleted" condition for search criteria.
Dim oExpression As New MFilesAPI.Expression
oExpression.DataStatusValueType = MFilesAPI.MFStatusType.MFStatusTypeDeleted
oExpression.DataStatusValueDataFunction = MFilesAPI.MFDataFunction.MFDataFunctionNoOp
Dim oTypedValue As New MFilesAPI.TypedValue
oTypedValue.SetValue(MFilesAPI.MFDataType.MFDatatypeBoolean, False)
Dim oDeletedEx As New MFilesAPI.SearchConditionEx
oDeletedEx.SearchCondition.Set(oExpression, MFilesAPI.MFConditionType.MFConditionTypeEqual, oTypedValue)
oDeletedEx.Enabled = True
oDeletedEx.Ignored = False
oDeletedEx.SpecialNULL = False

' Add the deleted condition.
oSc.AdditionalConditions.Add(-1, oDeletedEx)

' Add the new view.
oViewNew = oVault.ViewOperations.AddTemporarySearchView(oViewNew, oSc)


See Also

TemporarySearchView Members