0

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?

Reminisce
  • 101
  • 2
  • 14

2 Answers2

3

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.

AJPerez
  • 3,435
  • 10
  • 61
  • 91
0

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.

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331