I have a few FMP projects that I run where I need to process tens of thousands of records, and each process takes time.
So I want to be able to set up additional instances that can just run overnight on various computers in my office to accomplish these projects.
My problem is, one instance will grab a record, and then sometimes another instance will grab the same record and process it. While this doesn't really matter (except for the wasted time) for some applications, in particular, for marketing emails, this is a problem.
I'm trying this:
Set Error Capture [ On ]
Perform Find [ Specified Find Requests: Find Records; Criteria: Test::Sent: “="no"” ]
Go to Record/Request/Page [ First ]
Loop
If [ Test::Sent = "No" ]
Open Record/Request
Set Field [ Test::Sent; "Yes" ]
If [ Get ( LastError ) <> 301 ]
Set Field [ Test::Result; “<send email>” ]
End If
Go to Record/Request/Page [ Next; Exit after last ]
End If
End Loop
So, say I have 100 matching records. I'll get 110 or so emails.
I can't figure out how to truly get each instance not to step on the toes of another instance. Any ideas? I've try committing records, flushing the cache to disk, etc.