M-Files API 23.11.13135.0
SetValueListItemExpression Method
Expression Object : SetValueListItemExpression Method
Identifies the evaluated feature of a value list item.

Defines an optional data function for modifying the expression result. The data function availability depends on the evaluated data type.

In scripting languages, a specific null value (e.g., Nothing in VBScript) should be used to indicate the default value.

Description
Sets the expression for searching the value list items.
Syntax
Visual Basic
Public Sub SetValueListItemExpression( _
   ByVal PseudoPropertyDef As MFValueListItemPropertyDef, _
   ByVal PCBehavior As MFParentChildBehavior, _
   Optional ByVal DataFunctionCall As DataFunctionCall = 0 _
) 
Parameters
PseudoPropertyDef
ValueDescription
MFValueListItemPropertyDefDeletedDeleted status of the value list item.
MFValueListItemPropertyDefExtIDExternal ID (display ID) of the value list item.
MFValueListItemPropertyDefIDValue list item ID.
MFValueListItemPropertyDefNameValue list item name.
MFValueListItemPropertyDefObjectTypeObject type of the value list item.
MFValueListItemPropertyDefOwnerOwner of the value list item.
MFValueListItemPropertyDefParentParent of the value list item.
Identifies the evaluated feature of a value list item.
PCBehavior
ValueDescription
MFParentChildBehaviorIncludeChildValuesAccepts matches to child values as well.
MFParentChildBehaviorIncludeParentValuesAccepts matches to parent values as well.
MFParentChildBehaviorNoneNo special behavior.
DataFunctionCall

Defines an optional data function for modifying the expression result. The data function availability depends on the evaluated data type.

In scripting languages, a specific null value (e.g., Nothing in VBScript) should be used to indicate the default value.

Remarks

The value list item expression is used for searching value list items. It is practical for resolving a single value list item for an item ID. See the SearchForValueListItemsEx method for more details.

The target value (the right-hand operand) is assigned to the TypedValue object encapsulated in the parent SearchCondition object. The expected type of this value depends on the selected pseudo-property value.

 

Right-Hand Operand Types for Evaluated Pseudo-Properties

Evaluated Pseudo-Property Expected Typed Value Data Type Remarks

MFValueListItemPropertyDefID

MFDatatypeLookup ID as a lookup value.

MFValueListItemPropertyDefName

MFDatatypeText Display name of the item.

MFValueListItemPropertyDefOwner

MFDatatypeLookup ID of the owner item as a lookup value.

MFValueListItemPropertyDefParent

MFDatatypeInteger ID of the parent item.

MFValueListItemPropertyDefDeleted

MFDatatypeBoolean True or false. 

MFValueListItemPropertyDefObjectType

MFDatatypeInteger ID of the object type.

MFValueListItemPropertyDefExtID

MFDatatypeText External ID as a text value.
 

 

See Also

Expression Object  | Expression Members  | SearchForValueListItemsEx Method