M-Files API 22.6.11519.0
DataFunctionCall Object
An object for managing data functions. Used with the Expression class.

An object for managing Expression object data functions.  

Public Methods
Sets the date data function.
Sets the days from data function.
Sets the days to data function.
Sets the integer segment data function.
Sets the integer segment data function.
Sets the integer segment data function.
Sets the month data function.
Sets the no-op data function.
Sets the year data function.
Sets the year and month data function.
Public Properties
The data function of the call.

With data function it is possible to modify how the results of expressions are evaluated. When used while making searches the result of the modified expression is directly compared with the typed value that is specified in SearchCondition Object. The interpretation of the typed value with each respective data function is described in MFDataFunction Enumeration.

Initialize the data function with one of Set methods provided.

The image below illustrates the different parts of a search condition that utilizes a data function. The search condition in the image is created in Example 1.

1. Search condition, SearchCondition Object

2. Data function, DataFunctionCall Object

3. Expression, Expression Object

4. Comparison operator, MFConditionType Enumeration

5. Typed value, TypedValue Object

' In this example a new search condition is created that utilizes a data function 
' to search for objects that have been modified in the year 2010.

' 1. Create the search condition object
Dim searchCondition As New MFilesAPI.SearchCondition

' 2. Create a new data function that that describes
' how the expression should be compared with the typed value.
' In this case we create a data function that indicates that
' the year of the last modified timestamps of the objects are compared
' to the typed value that specifies the year as an integer.
Dim dfYear As New MFilesAPI.DataFunctionCall

' 3. Create the expression part for searching objects that have been
' been modified in the year 2010. The actual year is specified
' in the typed value part of the search condition.
Dim exprYear As New MFilesAPI.Expression
exprYear.SetPropertyValueExpression( _
        MFilesAPI.MFBuiltInPropertyDef.MFBuiltInPropertyDefLastModified, _
        MFilesAPI.MFParentChildBehavior.MFParentChildBehaviorNone, _
searchCondition.Expression = exprYear  ' Set the expression to the search condition.

' 4. Define an operator for the search condition.
' With the condition '=' we indicate that we want to search
' for objects that have been modified at the specified year.
searchCondition.ConditionType = MFilesAPI.MFConditionType.MFConditionTypeEqual

' 5. Create typed value that describes the year we want the objects
' to have been modified.
Dim tvYear2010 As New MFilesAPI.TypedValue
tvYear2010.SetValue(MFilesAPI.MFDataType.MFDatatypeInteger, 2010)
searchCondition.TypedValue = tvYear2010
See Also

DataFunctionCall Members  | SearchCondition Object  | Expression Object  | TypedValues Object