Jump to content
Server Maintenance This Week. ×

Looping script in FM12


This topic is 2611 days old. Please don't post here. Open a new topic instead.

Recommended Posts

It's possible you need to increase the length of the pause. This is no more than a conjecture, but I don't believe in computers acting in a completely random manner. It's much more likely that there is some sort of overload when Filemaker repeatedly asks the OS to save the files, and that the problem resurfaced because the system was more busy on further runs. Try increasing the pause dramatically - say 5 seconds - and see what happens.

The other option is to export all records as one file, then use another program to split it to individual files.

 

Edited by comment
Link to comment
Share on other sites

I seem to recall an issue with a memory leak involving new windows. Perhaps you could re-architect the script to avoid popping up 100 new windows. You're only exporting a single field, is that correct? Maybe Export Field Contents would work -- that exports a field in the current record, so you wouldn't need a new window to isolate each record before exporting.

Link to comment
Share on other sites

37 minutes ago, Fitch said:

Maybe Export Field Contents would work

The issue with Export Field Contents is that the resulting file is UTF-16 encoded, which many applications cannot handle. But there are other methods that would not require opening a new window - e.g. using AppleScript or a plugin to create the file.

 

Edited by comment
Link to comment
Share on other sites

Another way to loop through the records without a new window would be to gather all the IDs of the found set into a variable, $ID List for example, then find them one by one using GetValue( $ID List ; $n).

Link to comment
Share on other sites

This topic is 2611 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.