I'm also on FMP8 (XP)
field for search = "Findfeild"
Criteria = "this"
checkbox value = "Active"
Checkbox field = "Status"
Enter find mode
Setfield [ Table::Findfield ; "this" ]
Set ErrorCapture [on] ##optional
Replace Field Contents [ Table::Status ; "Active" ]
When changing large blocks of records, pay extra special attention to having backups.
Note: This task isn't very hard to do manually...if you are doing this on a regular basis, think about why this is so. There are some good reasons to do this often (like archiving blocks of invoices which are 6months old, etc.), but make sure you think it through.
Enjoy the day!
Thanks -that worked, more or less. The problem I ran into was that it was asking me what to replace the current contents with - either the current contents, an incrimental serial number or a calculuated value. Since my current contents were blank, that option was out; I wanted the same value ("no") for all boxes, so an incrimental number was out, and I couldn't figure out how to calculate the value "no"
So I used your script, but before I run it, I will have to check "no" on the first record of my found set, and then I can use the "current contents" option to check the rest of them.
You calculate the word "no" by using the quotation marks around the word.
For the replace field contents, choose calculation and a calc popup window will appear. In the big white box, type
with the quotes. Now you wont have to modify the first record and then the rest. Do them all at once with the calculation option.
Wow, that was too easy of a solution. Three cheers to over-thinking!
Note of caution: Replace Field Contents can be a bit dangerous if your file is shared between two or more users. If user 1 clicks in one of the fields that user 2 wants to update with Replace Field contents, they have locked the record and this will prevent Replace Field Contents from changing this one record. User 2 has no way to know this and if they perform a replace field contents operation, filemaker will report that a record was not updated but will not tell you WHICH record was locked by the other user. Thus, you should only use Replace field contents...
- On single user files or
- After hours when there are no other users accessing the DB or
- On records that are somehow made unavailable to other users prior to performing the replace (Difficult to do in 100% foolproof manner).
Thanks for the warning PhilMod -I'm the only one who uses this particular database, so that won't be an issue for me!