June 28, 200421 yr Hello all, I am implementing a button script that will show a set of records that match being marked as "Supervisor". I can get the script to work, however, when there are no records that are marked "Supervisor", a dialog pops up saying that No records match this request. This is all well and good, if you want to show that. However, I was wondering if there was something I could edit in my find script that would disable that dialog from displaying on the chance that there do exist zero records marked Supervisor?
June 28, 200421 yr Set Error Capture [On] either at the beginning of your script or before performing the find.
June 28, 200421 yr ... and immediately after the Perform Find step, add the steps: If ( Status ( CurrentFoundCount ) = 0 )
June 29, 200421 yr And don't forget to Set Error Capture [Off] after you've finished. Otherwise you'll lose every error.
June 29, 200421 yr It's a developer preference whether you leave it on or not. I prefer to activate it at the start of a script and leave it on for the rest, unless trapping for an unknown error or performing a particularly sensitive export. Paul is advocating setting it off directly after a find has been performed and any errors trapped. But it depends what your script does afterward whether it has much effect. I prefer users never see one of FileMaker's error dialogs. God only knows what they would do with it to screw up a scripted process.
July 3, 200421 yr This is definitely a bottle of port and a warm fire discussion. Yes, I too hate the thought of users seeing one of FMP's sometimes weird error messages BUT I'd rather that than find out three weeks later that the data is totally screwed because a user didn't know something bad had happened.
Create an account or sign in to comment