xxxxxxxxxxxxx 0 0 1 0 0 0 0
Is that one text field, different individual fields or one repeating field?
That makes a difference in how a script would do this.
How will you specify the search criteria? Always the past 2 years or will this vary, based on what the user inputs as criteria?
PS. this part of the forum is intended for reporting possible bugs with FileMaker products. It would have been better (and you would have likely gotten a quicker response) if you had posted this question in the FM Pro Forum (see tab at top of this screen).
In my example, the datbase contains a field for student name, mailing address, and an individual field for EACH session they have participated in. i.e. Spring 2009 - 0= no & 1= yes, Summer 2009 - 0 or 1, Fall 2009, Spring 2010, Summer 2010, etc...
I need to be able to FIND all the students that have attended AT LEAST one of those classes when printing mailing labels. I understand the a SCRIPT writen for the Contact Management Starter Solution does that. I need to be able to have that same type of FIND functionality over my database.
Sorry if this was the wrong place to post this type of question but I was directed here from the support person that helped me on the customer support phone line earlier today. Maybe I did not fully understand where he wanted me to post my question.
I'm hoping I can work through this challenge. It appears doable with a FIND script on printing labels. Thanks to all who help.
I imagine they directed you to this general location, rather than this specific tab.
The contact manager starter solution won't work here because your data is structured differently. (It doesn't have all those individual fields.)
I suggest you redesign your table, but first to answer your question.
"I need to be able to FIND all the students that have attended AT LEAST one of those classes"
Apologies in advance but that really doesn't answer my question from my last post: Is the find always going to be on the same 6 fields or will this change due to new fields being added or due to the user needing a different set of records for their labels?
Here's a "brute" force solution that may or may not do what you need here: What I am describing assumes that you always will search the same 6 fields.
Define a calculation field as Field 1 + Field 2 + Field 3 + Field 4 + Field 6 (but use your field names for the last 6 of these fields in your file.
Perform a find entering a 0 in this new calculation field, but use the omit option so that you omit all records where this field is 0.
In a script it would look like this:
Enter Find Mode 
Set Field [YourTable::cLast6SumField ; 0 ]
Set Error Capture [on]
Now back to the re design comment that I made earlier. If you were to define a related table for these individual fields where each field is replaced by a separate related record in this new table, this entire process would be much simpler and much, much more flexible.