Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
Gerard,
Ivan's suggestions are a good place to start, but likely this is going to get pretty exciting to try and do generically. The biggest issue I see is how you'd provide UI support for these more advanced options. I'm not seeing a way (currently) to allow the user to choose between using AND or OR with the criteria or letting them setup grouping. You might look into using the information panel feature. This allows for a user control to inserted into a BD. While its purpose is to provide details related to the row selected in the results area of the BD, you likely could instead use it to allow the user to change between AND/OR. Grouping will still be hard though (i.e. I have no idea how that might be accomplished).
If you can stay close to what the BD is intended to do, which is provide an easy and clear way for users to quickly select a record or set of records to work with, then you'll have a much easier time (the famous Ivan/Edhy/Charles rule of Don't fight the framework). I've also had some more complex needs in this area and ended up building my own. This is not a trivial task. I needed to allow AND/OR, use of a field more than once (e.g. to end up with something like Lastname = 'jones' Or LastName Like('smith%') ), the ability to use views, the need to use sub-queries in select columns, sub-queries in In() expressions, sub-queries in the from clause, pivot the results, use of SQL Functions in select columns. Bloody PIA. My suggestion would be to work within the confines of the BD if at all possible.
|