- Import your spread sheet into a separate table.
- Relate your two tables like this:
OriginalTable::Emailfield = ImportTable::Emailfield
- Perform a find on a layout based on your original table by putting a lone * into Import::EmailField. (If you do this manually, you'll need to add the field to your layout.)
- Make a back up copy of your file first. Then use Replace field contents to change the contents of "OK to Email" to "No" in one step. (Change the value of one field to "No" then select Replace Field Contents from the Records Menu to change the rest of the records in your found set to the same value.)
While I've described this process the way you would do this manually, it is possible to do the entire operation in a script so that all you have to do is click a button.
Import the Excel 300 email addresses into a FileMaker table (with just an email address field). This is just a table for this purpose.
Create a relationship from this table to the main table, based on email address.
Put a button in the Header of the imported emails table's layout. Attach a script step to the button:
Go To Related Record [ Main; Show only related records; Match all records in current found set (radio button); Main table's layout ]
This will go to the 300 (or however many are there to match).
Put your cursor in the "OK to Email" field (or click "No" if it's a radio button).
Records menu; Replace Field Contents [ OK to Email; "No" ]
I should say FIRST BACKUP YOUR FILE. There is no "undo" for Replace. It can quickly wipe out your data.
BTW, if this is a one-shot deal, you could just Open the Excel file, create the relationship and run the Go To Related Record from that new FileMaker file; more or less the same thing.
It also occurred to me that if this is something where you will be making this update on a regular basis, you might just redefine your Ok To Email field as a calculation field:
If ( Isempty ( ImportTable::EmailField ) ; "Yes" ; "No" )
Then you just add/remove records from the related table to change the status of this field.
Thank you both very much. I knew there had to be a better way!