Good day everyone,
As you all know, when you are trying to enter a field without adding a new record, you get the following error message:
So, is there anyway that i can show my custom error message?
Thanks a lot for your valuable time
You can just handle that too with Custom Menus. Just add functionality you wish for and triggers
Then in you Script you Set Error Capture (on)
And do a If () to handle the Error that comes from FileMaker. Then you can create your own Custom Dialog
Thanks for the quick response,
Where should i assign the script? I mean to which trigger?
You should try to do a script that does your Find instead of just using the Find in Status Bar. Best way to handle that is if you have FileMaker Pro Advanced and can do Custom Menus
FileMaker Pro 15 Help
Sorry John, i'm completely lost here
Yes i have Filemaker Pro 15 Advanced
In Custom Menus you on Perform Find you can instead of using FileMaker´s own Perform Find use a script that looks for Errors using Get(LastError).
- I have created the the provided script in the first reply
- I have created custom menu,
- In Perform Find, i checked Action and assigned the script to it,however, i still get the default error message dialog not my custom dialog! Note that the number of records is zero.
Sorry Johan, i have tried for hours but i'm still not getting it to work,
May you please provide me with a sample?
Your help is greatly appreciated.
thats the standard, default dialog. If You click on a layout and no records are present, this one appears. Can't be changed easily
Here is a example file
Thank you so much Johan,
The example file helped me a lot to get the idea very clear, but it isn't what i meant and wanted!
I guess the following error message cannot be replaced with a custom one as Markus mentioned in the above reply, is that right?
However, i'm really glad that you have taken me through the process of how a script works with custom menus
goldencode wrote: Thank you so much Johan, The example file helped me a lot to get the idea very clear, but it isn't what i meant and wanted!I guess the following error message cannot be replaced with a custom one as Markus mentioned in the above reply, is that right?
Correct in that you can't change this dialog. But the point that people are making on this thread is that you don't need to.
Using scripting you can capture any error and then decide what to do with it and what to show or not show to the user.
Retrieving data ...