Check boxes enter a selected value of your field's value list separated by a carriage returns if one or more check boxes have already been checked. Put a copy of your check box field next to the original and remove the check box formatting. Now click on your check box and see what appears in the unformatted copy. What you see in the unformatted field is what your script will need to set as search criteria in order to find the records.
...a script to find all records that have a checkbox in a certain field, and then export those records.
I am using "ready for export" = 1, which is not working. I figured "1" would represent a check in the checkbox, and "0" would represent no check.
If you have a field with a single checkbox, then unchecking that checkbox will not put a 0 in the field - it will simply become empty.
You can do your search in one script step:
Perform Find [ Speciﬁed Find Requests: Find Records; Criteria: Table::ReadyForExport: “1” ] [ Restore ]
Or a few steps that construct the Find request:
Enter Find Mode [ ]
Set Field [ Table:: ReadyForExport; 1 ]
Perform Find [ ]
While the second method takes three steps instead of one, many developers prefer it for it's clarity in what search is being performed.
Then you export the found set.
I used: Perform Find [ Speciﬁed Find Requests: Find Records; Criteria: Table::ReadyForExport: “ready” ] [ Restore ]
It works great. I had to change "1" to "ready" since that is the actual text displayed next to my checkbox.
So checked = "ready" or if checked, then "ready".
Thanks I really appreciate the help guys, it has better helped me understand filemaker scripts.