ConditionType | The operator of the search condition. |
Expression | The left side of the search condition. |
TypedValue | The right side of the search condition. |
A search condition consists of three parts. The left side of the search condition determines which piece of the document's metadata the search condition concerns. The middle part of the search condition is the type of the condition (e.g., "equal" or "not equal"). The right side of the search condition is the desired value of the expression.
The Expression object encapsulates the data required for the expression, including the left operand and possible options for the expression. A TypedValue object is used to define the value (i.e., an operand for the expression). The condition operator is set with the ConditionType member.
Setting search conditions and expressions in M-Files Desktop.
' Construct view object. Dim oView As New MFilesAPI.View oView.Common = True oView.Name = "Test View" oView.ViewType = MFilesAPI.MFViewType.MFViewTypeNormal ' Create search conditions for the view: object status is not deleted Dim oExpression As New MFilesAPI.Expression oExpression.SetStatusValueExpression(MFilesAPI.MFStatusType.MFStatusTypeDeleted) Dim oTypedValue As New MFilesAPI.TypedValue oTypedValue.SetValue(MFilesAPI.MFDataType.MFDatatypeBoolean, False) Dim oDeleted As New MFilesAPI.SearchCondition oDeleted.ConditionType = MFilesAPI.MFConditionType.MFConditionTypeEqual oDeleted.Set(expression, MFilesAPI.MFConditionType.MFConditionTypeEqual, oTypedValue) oView.SearchConditions.Add(-1, oDeleted) ' Add the view to client. oView = oVault.ViewOperations.AddView(oView)