A 'typed value' represents a value, such as text, number, date or a lookup item.
Clone | Creates a copy of the object. |
CloneFrom | Copies the content to this object from another object. |
CompareTo | Compares this typed value to the given typed value. |
GetLookupID | Gets the lookup ID. The typed value must be of the lookup type. |
GetValueAsLocalizedText | Gets the current value as localized text. The value is localized based on the culture of the local computer. |
GetValueAsLocalizedTextEx | Gets the current value as localized text. The value is localized based on the culture setting of the local computer. |
GetValueAsLookup | Gets the value as a lookup. |
GetValueAsLookups | Gets the value as a lookups. |
GetValueAsText | Gets the value of this typed value formatted with the given parameters. |
GetValueAsTextEx | Gets the value of this typed value formatted with the given parameters. |
GetValueAsTextWithExpression | Gets the current value as localized text modified according to the given expression. |
GetValueAsTimestamp | Gets the value as timestamp. |
GetValueAsUnlocalizedText | Gets the current value as unlocalized text. |
IsNULL | Specifies whether the typed value is a NULL value. |
IsUninitialized | Specifies whether the typed value is uninitialized. |
Serialize | Serializes the typed value. |
SetTimeLocalized | Sets the value of a time property in localized or UTC format. |
SetValue | Sets the value of a typed value. |
SetValueToLookup | Set the value to a lookup. |
SetValueToMultiSelectLookup | Sets the value to a multi-select lookup. |
SetValueToNULL | Sets the typed value to NULL of the specified data type. |
Unserialize | Unserializes the typed value. |
DataType | The data type of the typed value. |
DisplayValue | The textual representation of the typed value. |
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. |
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.
' 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