﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » BrowseDialog Search Fields using 'OR' criteria</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 11 Sep 2026 08:57:58 GMT</lastBuildDate><ttl>20</ttl><item><title>BrowseDialog Search Fields using 'OR' criteria</title><link>http://forum.strataframe.net/FindPost28455.aspx</link><description>If you have multiple search fields in a BrowseDialog, the search seems to be based on 'Anding' the search conditions. Is there a way to 'OR' the conditions or have bracketed conditions. e.g. I want say 3 search criteria (Name, Email1, Email2) and I want a list returned where 'Gerard' is contained in &lt;font color=#ff0000&gt;'ANY'&lt;/font&gt; of the 3 columns as opposed to &lt;font style="background-color: #ff0000"&gt;ALL&lt;/font&gt; 3 colums</description><pubDate>Thu, 23 Sep 2010 12:20:18 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: BrowseDialog Search Fields using 'OR' criteria</title><link>http://forum.strataframe.net/FindPost28476.aspx</link><description>The BD has evolved a lot since I first started using SF, so some of these features likely will make it into the component by then too. :D</description><pubDate>Thu, 23 Sep 2010 12:20:18 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: BrowseDialog Search Fields using 'OR' criteria</title><link>http://forum.strataframe.net/FindPost28464.aspx</link><description>Ok. I'll take your advice and work with exisitng BD at the moment. If it becomes a major issue in the future (at which time I should have a bit more experience of Dot net &amp;amp; c#),&amp;nbsp; I may try rolling out my own&amp;nbsp;</description><pubDate>Thu, 23 Sep 2010 02:23:53 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: BrowseDialog Search Fields using 'OR' criteria</title><link>http://forum.strataframe.net/FindPost28463.aspx</link><description>Gerard,&lt;br/&gt;&lt;br/&gt;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.&amp;nbsp; You might look into using the information panel feature.&amp;nbsp; This allows for a user control to inserted into a BD.&amp;nbsp; While its purpose is to provide details related to the row&amp;nbsp; selected in the results area of the BD, you likely could instead use it to allow the user to change between AND/OR.&amp;nbsp; Grouping will still be hard though (i.e. I have no idea how that might be accomplished).&lt;br/&gt;&lt;br/&gt;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 &lt;span style="font-weight: bold; font-style: italic;"&gt;Don't fight the framework&lt;/span&gt;).&amp;nbsp; I've also had some more complex needs in this area and ended up building my own. This is not a trivial task.&amp;nbsp; I needed to allow AND/OR, use of a field more than once (e.g. to end up with something like &lt;span style="font-style: italic;"&gt;Lastname = 'jones' Or LastName Like('smith%')&lt;/span&gt; ), 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.&amp;nbsp; Bloody PIA.&amp;nbsp; My suggestion would be to work within the confines of the BD if at all possible. </description><pubDate>Wed, 22 Sep 2010 18:58:05 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: BrowseDialog Search Fields using 'OR' criteria</title><link>http://forum.strataframe.net/FindPost28462.aspx</link><description>Got it.&lt;br/&gt;&lt;br/&gt;Unfortunately no, there isn't such a property currently. I will check if it is on the list for the next updates. </description><pubDate>Wed, 22 Sep 2010 18:50:21 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: BrowseDialog Search Fields using 'OR' criteria</title><link>http://forum.strataframe.net/FindPost28460.aspx</link><description>Hi Ivan.&lt;br/&gt;&lt;br/&gt;Where I am coming from in this is trying to build a Generic BrowseDialog, which I have now more or less in place , thanks to yourself and Greg's help. I thought there might have been a property to control this (i.e. and/or betweeen the Search conditions)&amp;nbsp;which I could set programatically as part of my generic browse.&amp;nbsp; To handle this generically I think is going to be difficult if I have to get into coding Events (generically).</description><pubDate>Wed, 22 Sep 2010 04:08:07 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: BrowseDialog Search Fields using 'OR' criteria</title><link>http://forum.strataframe.net/FindPost28457.aspx</link><description>Hi Gerard.&lt;br/&gt;&lt;br/&gt;The first thing I would say to accomplish this would be to&amp;nbsp;execute&amp;nbsp;3 different searchs, filling each of the desired search fields each time and dealing with the results of each of them. Yeah, I know this is not what you want, so if not that way, I would deal with the BeforeSearchExecuted new event created for the BrowseDialog. This exposes the QueryInformation class that is already built and populated and you can manipulate the result set, fields, where, etc.&lt;br/&gt;&lt;br/&gt;I haven't used it for this purpose, but it sounds like the place to try.</description><pubDate>Tue, 21 Sep 2010 17:57:15 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item></channel></rss>