I'm not sure how you set up your checkboxes. There are three options to evaluate:
- One checkbox formatted field with all the values listed for this one field.
- Indivdidual fields with just one check box value for each field.
- A set of (usually related) records with one checkbox value for each record.
All can look very much the same though #3 also enables you to include a scroll bar that isn't possible with 1 and 2.
But each will require a different approach for performing a find.
And then you have to decide whether the criteria you specify with your check box is for an "and" search or an "or" search.
Find all records where value 1 is selected or value 2 is selected?
FInd all records where value 1 and value 2 are both selected?
A scripted example of a find that uses a single field checkbox with global storage specified to perform an OR search may be found in the follow on posts in this thread: Scripted Find Examples
I'm reading http://fmlayoutmode.com/wp/?p=2500 now. Seems to be related to what I am looking to do. I'll take a look at your tutorial/forum post after that.
The answer to which I am using, I've tried the three options you mentioned. I need a dynamic list so the #2 was a no go. I'm leaning towards #3 because of the scroll option, just in case the list is too long to populate the alotted space that I give it. The search is going to be an "or" search/find.
To the drawing boards I go. Thanks for the link.
Awesome Phil! Your way seems to be the best route. Relating to your tutorial post, what field type does Globals::gFruitlist have to be?
To quote my previous post: "a single field checkbox with global storage specified". In otherwords, it's your standard single field with multiple values checkbox field, but with global storage specified so that it's values remain accessible to the script when the script enters find mode. If you don't use global storage for this field, you have to set a variable to this field's value before entering find mode and then you refer to the variable in place of the global field. Using global storage saves you a step and keeps other users on a hosted database from seeing the choices made in the checkboxes.