If the find is done within a script, you can get what you're after.
Before the "Perform Find" step, set ErrorCapture [on]. ###This takes out the standard NoRecordsFound dialog.
After the Perform Find step and turning ErrorCapture[off]:
If (Get(FoundCount) = 0 )
Show Custom Dialog ###insert what you want to do here###
The custom dialog can include buttons to click. Based on what the user entry is, you can steer into different functions. Check out the custom dialog help menus...they are fairly clear and straightforward.
Thanks so much for the response.
I haven't set up a separate search script, I'm referring to the standard message FM gives when you perform a search.
I figured that was what you meant...I don't know how to customize the standard 'no records found' nor have heard anyone else comment on it. So I was offering a way to turn it off and put your own in.
If there's a way to customize the built in 'default' message, I'll learn about it on this thread too.
I'm gonna give it a try and I'm guessing it could work just as well. I'll let you know how it goes. Would be interesting to know if the default text can be edited.
Thank you for your posts.
At this time, you cannot change the default dialog box when a search yields no records. The answer provided by "Ninja" is correct (Thank you!). That is, create a script, turn on Error Capture and check to see if Get (FoundCount) equals 0 (zero). If so, no records have been found, and you can then display your own dialog box.
Actually there is a way to get this effect if you have FMP advanced so that you can create a custom menu.
Create a script:
Set Error Capture [on]
If [ Get ( Foundcount ) = 0 ]
Show Custom Dialog ["Put your message here"]
Now create a custom menu where you've edited a copy of the Requests submenu to perform this script in place of the original Perform Find menu option. If you set your parameters up correctly, your users will be able to trigger this script by making the same menu or tool bar choices they do now to perform a find--just your script kicks in instead.
Excellent! Something I never even considered...
Thanks so much, this really did work!
Great, but I have a follow up question.
Say I have a search with no results, and I don't want to show any dialog at all, I just want to show an empty list. How whould that script step look like? To just do nothing returns for some reason the fields that was visible before the search.
Found the answer to my question.