you get an error because when in find mode all fields are empty until you put something in them. try set var to the field that has the value that you want to find THEN go into find mode, set field to the variable, and perform find.
Go to Layout[ "Purchases" ( Purchase ) ]
set var $criteria = Purchase::PreviousPurchaseYr
Enter Find Mode [ ]
Set field [Purchase::PurchaseYr ; $criteria ]
Perform Find [ ]
Take a layout with fields and data visible and enter find mode. Notice how all the data in the fields disappear unless the data is in a global field?
At the time your set field step executes, the Purchase::PreviousPurchaseYr field will be empty due to the window being in find mode. Set a variable to this field's value first, then enter find mode and then refer to the variable in your set field step instead of the field.
good advice on the variable set before any switching from where you are! I might just use this:
Set Variable ( $prevYr ; "//" & Year(Purchase::PurchaseYr) - 1)
Then just use that. No need to have the calculation field (?) "Purchase::PreviousPurchasYr".
the "*" is the 'anything' wildcard, so:
finds all from last year
The reason to be flexible on the variable "calc" in the find, is that you might want 2 years ago, or just this year, for example.
You don't need the wild card.
If you enter 2017 as find criteria in a field of type date, it will find all records with a 2017 date. FileMaker basically adds the wild cards for you.
You can also enter 3/2017 to find all records in March 2017
I'd never tried that in a scripted find request!