Help on create predicate with addwithor

Posts   
 
    
mds avatar
mds
User
Posts: 33
Joined: 24-Sep-2006
# Posted on: 24-Oct-2006 08:58:27   

Hi

I'm using selfservicing model and VS 2003, I'm trying to create a predicate expression that generates a query like this:

FALSE OR (STATE_FIELD='0') OR (STATE_FIELD='1').....OR (STATE_FIELD='X')....

So, I create a predicate expression instance and use AddWithOr method ... ... but I'm not able to generate the first part of the sql query ( a simply ... FALSE ).

Thanks

Matteo
Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 24-Oct-2006 09:47:08   

You can implement IExpression as shown in the following thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=3829

But as far as I know, you can do without the FALSE OR expression. Since FALSE would have no effect on the result of the OR operation. The result will be totally dependant on the other predicates.

FALSE OR XYZ = XYZ

mds avatar
mds
User
Posts: 33
Joined: 24-Sep-2006
# Posted on: 24-Oct-2006 13:02:59   

Walaa wrote:

You can implement IExpression as shown in the following thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=3829

Ok thanks I'll try it

Walaa wrote:

But as far as I know, you can do without the FALSE OR expression. Since FALSE would have no effect on the result of the OR operation. The result will be totally dependant on the other predicates. FALSE OR XYZ = XYZ

The predicate FALSE is always present while the other depends of some option checked on the UI .... If no option is selected I've to return FALSE...

Thanks for the suggestion