Does anyone know how can we filter BC results based on multiple values in search specification?
As IN
keyword in SQL ?
something like:
bc.SetSearchExpr("[Id] in ('a','b','c')");
Or use of OR
operator is the only solution?
No, you can't use IN
in Siebel, it's not a valid search operator. But at least, you can simplify your expression by using a search specification instead of a search expression. These two lines do exactly the same:
bc.SetSearchExpr("[Id]='a' or [Id]='b' or [Id]='c'");
bc.SetSearchSpec("Id", "='a' OR ='b' OR ='c'");
Note that you can't use both SetSearchSpec
and SetSearchExpr
methods simultaneously.
You can use OR like this:
bc.SetSearchExpr("[Id] = 'a' or [Id] ='b' or [Id] ='c')");
but I think using IN
is better than using OR
.
Other than using IN
or OR
you dont have any option.