Message 1 of 7
Not applicable
07-23-2019
01:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
is there a possibility to add more than one condition to a search sets via a plugin?
Right now I only can add one condition with the following code:
public SavedItem create_search(string categorydisplayname, string propertydisplayname, string variantdata, string searchsetsname)
{
Search s = new Search();
SearchCondition sc = SearchCondition.HasPropertyByDisplayName(categorydisplayname, propertydisplayname);
s.SearchConditions.Add(sc.EqualValue(VariantData.FromDisplayString(variantdata)));
////set the selection to everything
s.Selection.SelectAll();
s.Locations = SearchLocations.DescendantsAndSelf;
SavedItem newItem = new SelectionSet(s);
newItem.DisplayName = searchsetsname;
return newItem;
}Can anyone explain me how to add multiple conditions?
(Just for explanations: I will need to add the search set to a FolderItem, that's why I'm using SavedItem, but if there is a better solution, please explain me.)
Thanks in advance.
Regards
Ramona
Solved! Go to Solution.