VB Script to move data on a metadata card from a multi select field to a text field.

I have written a quick script to move data from a Multiselect field to a text field but am getting an error on line 5. The error is is telling me object is required but it is showing me the string of information I want it to return. Any help here would be great. 

Thanks,

NSH

Dim pastDecision: Set pastDecision= CreateObject("MFilesAPI.PropertyValue")
	pastDecision.PropertyDef = 1941 ' Text field "Past desisions reasons" destination Property for no decision lookups

Dim noDecision
Set noDecision = PropertyValues.SearchForProperty(1938).TypedValue.DisplayValue ' no decision field reason multi-select look-up"

pastDecision.TypedValue.SetValue MFilesAPI.MFDataType.MFDatatypeMultiLineText, noDecision 'Item(1).Item
Vault.ObjectPropertyOperations.SetProperty ObjVer, pastDecision

Parents
  • Try this:

    Dim pastDecision: Set pastDecision= CreateObject("MFilesAPI.PropertyValue")
    pastDecision.PropertyDef = 1941 ' Text field "Past desisions reasons" destination Property for no decision lookups

    Dim noDecision : noDecision = PropertyValues.SearchForProperty(1938).TypedValue.DisplayValue ' no decision field reason multi-select look-up"

    pastDecision.TypedValue.SetValue MFilesAPI.MFDataType.MFDatatypeMultiLineText, noDecision 'Item(1).Item
    Vault.ObjectPropertyOperations.SetProperty ObjVer, pastDecision

Reply
  • Try this:

    Dim pastDecision: Set pastDecision= CreateObject("MFilesAPI.PropertyValue")
    pastDecision.PropertyDef = 1941 ' Text field "Past desisions reasons" destination Property for no decision lookups

    Dim noDecision : noDecision = PropertyValues.SearchForProperty(1938).TypedValue.DisplayValue ' no decision field reason multi-select look-up"

    pastDecision.TypedValue.SetValue MFilesAPI.MFDataType.MFDatatypeMultiLineText, noDecision 'Item(1).Item
    Vault.ObjectPropertyOperations.SetProperty ObjVer, pastDecision

Children