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:
-
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 % %.
-
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!