This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Search Conditions in VBS

Hello,

I am trying to search an object and one of the search condition should be YEAR.

I tried the following code, with no success:

	oSearchCondition.ConditionType = 1
    oSearchCondition.Expression.DataPropertyValuePropertyDef  = 1154
	oSearchCondition.Expression.DataPropertyValueDataFunction = 1
    oSearchCondition.TypedValue.SetValue 1, "2021"
    oSearchConditions.Add -1, oSearchCondition

The error returned is "Wrong data type".

Any tips on how to search for an object with a date PD, by year.

Regards,

Radu