AnsweredAssumed Answered

Script with Sort Step Causes FMP11 to Freeze HELP

Question asked by JoshPoplawski on Oct 27, 2011
Latest reply on Oct 31, 2011 by philmodjunk

Title

Script with Sort Step Causes FMP11 to Freeze HELP

Post

 I created a database to track Leave Requests. Based on the date leave is requested for and the person requesting it a serial number is generated. I wrote a script called "Prevent duplicates" that:

1 Finds all duplicate serial numbers --> 2 puts "duplicate" in a field titled "duplicate marker" so that conditional formatting can highlight all duplicate records a distinguishing color -->3 Shows all records --> 4 sorts records.

The problem is when i run this script it freezes up File maker pro. Even when i shut down FMP with the task manager and reopen the file it opens frozzen. I have to recover the database file to continue to work with it.

I have manually run the find and had no problems

I have manually run the sort and had no problems

On a whim i removed the sort record script step (#4 above) from the script and ran the script. when i did that the script ran fine with out locking up FMP. I don't understand why sorting at the end of my script is causing FMP to lock up especially when i can do the same exact sort manually without a problem.

The Sort runs like this:1. Leave Start Date field (ascending) 2. designate management contract field (ascending) 3. Type of Leave (custom sort) 4. approval status sort field (ascending) 5. Time stamp (ascending)

Please help me with this. I need to know why this caused a freeze up of FMP so i don't let it happen again and also i need to have the script sort the records as listed above at the end. Thanks to all for input.

Here is the Script:

 

script.JPG

Outcomes