Customer Search using Data Service

How do we compare the field value with a list of values when using the Data Service Search.

Litium version: _[Version number]_7

Have a look at Dataservice BoolFilterDesciptor.Should

I have a list of sellers, so I need to compare a field on Person to know if the person is assigned to any of the seller in the list, if I add it as foreach like below, it is not returning any results, is there a way to include a condition like this in search.

foreach (var seller in filterSeller)
{
request.Filter(x => x.Bool(
y => y.Should(
z => z.Field(PersonFieldNameConstants.AssignedTo, “eq”, seller.Value.ToString()))));
}

Perhaps something like this:

   .Should(should => {
      foreach (var seller in filterSeller) 
         should.Field(PersonFieldNameConstants.AssignedTo, “eq”, seller.Value.ToString());
   })));

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.