It is the older method that has been around the longest. The other is newer FMPro features. Use what works.
Enter find mode set field is almost always the preferred method, especially if you (or multiple developers) need to read the script and immediately understand what it is doing.
Thanks TKnTexas and Bruce.
Bruce- you say 'especially' if others need to read the script, which makes sense to me. But does that mean there are other important reasons to prefer the enter find mode? Could you point me to any discussions on the subject? Thanks.
Three advantages to the "Set field" method: (the other method is actually the original method--but with newer features that allow access to the stored find requests added at a later date.)
1) as stated, you can see all the criteria used without needing to open an additional window to do so
2) Set field can evaluate a calculation in order to produce the needed search criterion. example "YourTable::gDate1 & "...& and YourTable::gDate2
3) Set field is often used in conjunction with global fields where the user enters/select find criteria while in Browse mode, then the script takes relatively simple data such as dates selected from popup calendars in two separate fields and constructs a much more sophisticated criterion such as the above date range example. While this can be done by using Set Variable to assign the resulting search text to a variable and then referencing a variable in the stored find criteria, the set field step does this in one step rather than two.
Believe it or not, the original way to script a find was to manually perform the find and then specify Perform Find--which stored and used the last specified set of criteria from your manual find, in your script to perform it the next time. If you later needed to have your script use different criteria, you manually performed a new find, re-opened the script in the editor and told FileMaker to update the find with the last used find criteria in order to apply the update...
We've come a long way since then!