Find requests with saved $vars in them fail
Operating system version
Mac OS X 10.7.4
Description of the issue
A Perform Find script step that restores a find request that includes a $var sometimes works, and sometimes fails.
Steps to reproduce the problem
Build a database with at least 1 text field. Populate several records with people's names in the text field (values like "John Smith", "Darren Terry", etc). Create a script with 2 steps:
Set Variable [ $name ; "Darren Terry" ] <-- or whatever name value you want
Perform Find [ Restore ]
//# where the find is restoring a find request with $name in the Name field only.
The find should work, locating the record(s) that match the contents of the variable.
In my experience, 50/50 that it will work or will fail inexplicably. Modifying the last find when it fails shows the correct value in the field, and then performing that find will (usually) cause it to work suddenly.
I believe that the functionality of supporting $vars directly in find requests isn't fully baked in FMP12.
MacBook Pro 17", 2.5 GHz Intel Core i7, 8 GB 1333 MHz DDR3, SSD
The workaround is to do this instead:
Enter Find Mode 
Set Field [ Name ; $name ]
Perform Find 
In other words, don't restore a find request with the variable in it. Instead, explicitly go to FInd Mode and set the field to $name, then perform that find. This universally works.