I have a value list, I'll call it VL.Statuses. I'm trying to search for objects which have a particular status, which is defined by its workflow state. We're unable to use a vault application due to security and performance restrictions, hence I can't use a workflow state action, so I'm trying to search for objects that have their PD.Status property set to a particular value in VL.Statuses. PD.Status is of type single select lookup.
This is where I'm currently at:
SearchCondition scWorkflowState = new SearchCondition();
// condition type
scWorkflowState.ConditionType = MFConditionType.MFConditionTypeEqual;
// condition expression
scWorkflowState.Expression.SetPropertyValueExpression(
vault.PropertyDefOperations.GetPropertyDefIDByAlias("PD.Status"), 0);
// typed value
scWorkflowState.TypedValue.SetValue(MFDataType.MFDatatypeLookup,
vault.ValueListItemOperations.GetValueListItemByID(117, 6).Name
);
117 is VL.Status's ID, 6 is the desired item ID.
I understand that this probably wont work, because the datatype is Lookup, and that is a string/text value. Does anybody know how I can convert this VL item to a lookup, or is there a better way to do this?
Bonus Question: How do I explicitly convert Date property values to DateTime and vice versa?