This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I'm trying to implement a search feature where the user can specify one or more search criteria in a form, and then perform conditional AND and OR logic to build the correct search query to load an Entity. What is the best way to do this? I've read through the User Guide but it's not obvious to me how to combine a bunch of WHERE clauses where some use AND and some use OR, within the same query. For example, the user can enter a "keyword" and also an optional "category". The "keyword" should match on ("Title" OR "Description") AND (CategoryId). |
|
|
You should be able to achieve this fairly easily by building up the QueryExpression as required, e.g. assume you have a Dictionary
You can adjust the operator use etc accordingly. In terms of specifying the query you mentioned above, you can specify this as:
So when specifying your query expression you can use brackets to maintain the structure of the expression you desire.
|
|