Finds on Checkboxes - How get Servoy to act like FMP?

Preface: Dug through the forum and all docs first, without success…

I have run into a dilemma with checkboxes. I have a client who applies categories to each record, between 1 and 15 discrete values. These categories are then used for various reports etc. They have gotten used to being able to do a Find in FMP, select one or more checks and then have a found set of all records that include the specified values.

In Servoy, if I select one checkbox in Find mode, I get only the records with that exact value (not that plus others). Since I can’t include wild cards when selecting from checks, I would have to do a scripted find via a button (and give up on/disable the standard find) or use a global find (which can be a problem given the presence of long text descriptions which should not always be use to determine the count of matching records). Has anyone found a good way to solve this?

The two ideas that come to mind for me are:

  1. Set a property on elements to allow for searches to be default wildcarded (not great, but an option), so that the string passed to the db would be bracketed with % %.

  2. Follow the idea discussed in Trigger method on search - Classic Servoy - Servoy Community for an OnSearchCmd method. My expansion would be to allow for such a method to exist not only at the form level, but for each element (searchable ones). If the method existed for the field used in a search, the method would be passed the criteria selected and would be responsible for creating and returning a FoundSet (I’m certain that there are many issues I am neglecting to address here!). In some cases, this could be handled by then calling a db stored procedure or other server side mechanism, which could reduce the performance hit this could impose.
    This is on Version R2 2.0.2-build 275 Java version 1.4.0_01-b03 (Windows 2000)
    Thoughts/Catcalls/Alternatives?
    Thanks!

option 1 would not always work because if you have 2 values selected of the 15 then this would be generated:

%%selectedvalue1%%selectedvalue2%%

would mean that selectedvalue1 has to be first in the text so before selectedvalue2. Or else you wouldn’t get those either.

with option 2 you could genereate youre own “findstate” so that you can do the right search. But we have to see how we can do that.

for now what you could do is that those 15 values are 15 columns. And you place a checkbox per column. Then the search would go allright.
But this is not a nice way.

The best solution for this is you create another table with the 15 values and then a n-m table between youre main and the 15values table. Then the search would be a related search over the n-m table.

We have a example for this on servoymagazine i believe.