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

API Search in value list for "one of" condition

I'm developing UIX search panel, it doesnt work to search mutiple value in a value list, the script below for your advice, thanks

Here is the Conditions shown after created the search

var scKeyword = new MFiles.SearchCondition();
var oSc = new MFiles.SearchCriteria();

var ids = [1,3];

scKeyword.ConditionType = MFConditionType.MFConditionTypeEqual;
scKeyword.TypedValue.SetValue(MFDataType.MFDatatypeMultiSelectLookup, ids);

scKeyword.Expression.SetPropertyValueExpression(
  KeywordPropertyDefId, 
  MFParentChildBehavior.MFParentChildBehaviorNone,
  new MFiles.DataFunctionCall()
  );
var scexKeyword = new MFiles.SearchConditionEx();
scexKeyword.Set(scKeyword, true, false, false);

oSc.AdditionalConditions.Add(-1, scexKeyword);

Parents Reply
  • I'm struggling a little with time today, and I don't have a UIX application that does something similar that I can easily test with.  I will try to find some time later or tomorrow to create something.

    If you have a simple UIX application that'll get me started (I can alter IDs and things to one of my sample vaults) then that may make it quicker for me to test out; feel free to send me a private message.

Children