Friday, 14 June 2019
  6 Replies
  1.3K Visits
0
Votes
Undo
Please see the following code.


FilterExpression filter1 = MySettings.EbApplication.CreateFilter();
filter1.Kind = ObjectKind.Device;
FilterExpression filter2 = MySettings.EbApplication.CreateFilter();
filter2.Kind = ObjectKind.Device;
string concatenatedSearchTerm = String.Concat("*", searchTerm, "*");
filter1.Add(AttributeId.Material, BinaryOperator.Equal, searchTerm.ToString());
filter2.Add(AttributeId.Manufacturer, BinaryOperator.Equal, concatenatedSearchTerm);


My filter 2 allows me to search for a term such as "omethin" to find "Something" within the manufacturer attribute.
My filter 1 had to be solved as above to give me any result at all. It would be nice to read some explanation on why there is such a difference and how I could somehow wildcard-search within that field. It would be acceptable for me to have to enter the asterisks as part of the `searchTerm`.

Thank you very much.

PS: if I may mix topics - is there a way to "OR"-connect to filters?