How to search unmanaged object by using Property ?

I want to search and collect some unmanaged objects based on their names and promote them into managed objects, I have tried many things but no luck.

Could someone please help on this ?

My search logic is like below

SearchConditions searchCondtions = new SearchConditions();
SearchCondition searchCondtion = new SearchCondition();
searchCondtion.ConditionType = MFConditionType.MFConditionTypeEqual;
searchCondtion.Expression.SetStatusValueExpression(MFStatusType.MFStatusTypeObjectTypeID, null);
searchCondtion.TypedValue.SetValue(MFDataType.MFDatatypeLookup, 0);

searchCondtion = new SearchCondition();
searchCondtion.ConditionType = MFConditionType.MFConditionTypeEqual;
searchCondtion.Expression.SetPropertyValueExpression(0, MFParentChildBehavior.MFParentChildBehaviorNone );
searchCondtion.TypedValue.SetValue(MFDataType.MFDatatypeText, "FileName");
searchCondtions.Add(1, searchCondtion);

var result = Vault.ObjectSearchOperations
.SearchForObjectsByConditions(searchCondtions, MFSearchFlags.MFSearchFlagIncludeUnmanagedObjects, true)
.Cast<ObjectVersion>()
.FirstOrDefault();

Parents Reply
  • Hi, The below condition works fine but

    var condition = new SearchCondition();
    condition.Expression.SetPropertyValueExpression((int)MFBuiltInPropertyDef.MFBuiltInPropertyDefRepository, MFParentChildBehavior.MFParentChildBehaviorNone);
    condition.ConditionType = MFConditionType.MFConditionTypeEqual;
    var lookup = new Lookup();
    lookup.ExternalRepositoryName = "90bb252efa09494b8662332ba5d49d77"; // The connection ID, shown in the configuration.
    condition.TypedValue.SetValue(MFDataType.MFDatatypeLookup, lookup);
    searchConditions.Add(-1, condition);

    Similiarly I need to add a condtion with MFBuiltInPropertyDefCreatedFromExternalLocation ( could not find out what the value and where to get to supply here)

    Please see the image below I need to find this document based on the location or IML FIle Path and then I need to promote it 

    Could you please suggest an approach ?

    Thank you very much for your answers

Children
No Data