M-Files API 23.11.13135.0
TypedValue Object
Members 
Description
A 'typed value' represents a value, such as text, number, date or a lookup item.
Public Methods
Creates a copy of the object.
Copies the content to this object from another object.
Compares this typed value to the given typed value.
Gets the lookup ID. The typed value must be of the lookup type.
Gets the current value as localized text. The value is localized based on the culture of the local computer.
Gets the current value as localized text. The value is localized based on the culture setting of the local computer.
Gets the value as a lookup.
Gets the value as a lookups.
Gets the value of this typed value formatted with the given parameters.
Gets the value of this typed value formatted with the given parameters.
Gets the current value as localized text modified according to the given expression.
Gets the value as timestamp.
Gets the current value as unlocalized text.
Specifies whether the typed value is a NULL value.
Specifies whether the typed value is uninitialized.
Serializes the typed value.
Sets the value of a time property in localized or UTC format.
Sets the value of a typed value.
Set the value to a lookup.
Sets the value to a multi-select lookup.
Sets the typed value to NULL of the specified data type.
Unserializes the typed value.
Public Properties
The data type of the typed value.
The textual representation of the typed value.
The value of the type value. If the data type of a typed value is MFDataTypeLookup, only the ID part of the lookup is included.
Remarks

The value and type of the TypedValue object depends on the data type of the property value. The type can be one of the basic types or a lookup reference to an object or value list item.

Example
' Identify the object and property.
Dim oObjVer As MFilesAPI.ObjVer
Dim iPropertyId As Integer
'...

' Get the value of property.
Dim oPropertyValues As MFilesAPI.PropertyValues = oVault.ObjectPropertyOperations.GetProperties(oObjVer)
Dim oPropertyValue As MFilesAPI.PropertyValue = oPropertyValues.SearchForProperty(iPropertyId)

' Read the contents of TypedValue, depending on its type.
If oPropertyValue.TypedValue.DataType = MFilesAPI.MFDataType.MFDatatypeText Then

    ' Get the value as unmodified text.
    Dim str As String = oPropertyValue.TypedValue.Value
    ' ...

ElseIf oPropertyValue.TypedValue.DataType = MFilesAPI.MFDataType.MFDatatypeLookup Then

    ' Get the value as lookup reference.
    Dim oLookUpRef As MFilesAPI.Lookup = oPropertyValue.TypedValue.GetValueAsLookup()
    ' Process the lookup item.

ElseIf oPropertyValue.TypedValue.DataType = MFilesAPI.MFDataType.MFDatatypeMultiSelectLookup Then

    ' Multi-select lookup. Loop through all lookup items.
    For Each oLookUpRef As MFilesAPI.Lookup In oPropertyValue.TypedValue.GetValueAsLookups

        ' Process each lookup item.

    Next

Else

    ' Just get the value as string in local format.
    Dim str As String = oPropertyValue.TypedValue.GetValueAsLocalizedText()
    ' ...

End If
See Also

TypedValue Members  | SearchCondition Object