December 6, 200520 yr Hi, I have a script that has Filemaker perform a find request. The only problem is that when the the requested data can't be found Filemaker shows an ungly error message with various options. Basically what I want to happen is either for the script to simply end when the find fails or I want it to show some kind of a custom dialog. My problem with doing any of this is I can't figure out to put a condition in my script that says if the find fails then do this. If anybody could help I would be most appreciative.
December 6, 200520 yr Try Use Set Error Capture[off,on] script for your problem may be it will help you. To me its help.
December 6, 200520 yr Author Hi, thanks a lot for your help. your suggestion did exactly wat u said it would and has solved one of my problems. turning error capture on does get rid of the ugly error message like i wanted but howver it is causing a couple of other problems. Is there anyway of simply telling scriptmaker to do something if it finds no results. What I am thinking about is using an If clause. So for example If find returns no results then do this. If you have any ideas please write back.
December 6, 200520 yr A simple find script would be. SetErrorCapture [On] EnterFindMode[] // you need to set your find mode to pause //do your find PerformFind[] If[Get ( LastError ) = 401] ShowCustomDialog ["No records match this find request"] ShowAllRecords EndIf From here you can add any number of options. Hope this helps. Dean
December 6, 200520 yr Author Hey, Thanks so much. That's exactly what I needed. The script works just the way I wanted now. If you don't mind me asking you one last question though. In a custom dialog with an input field is there nayway to make it so that a user has to enter a value. Well anyway thanks so much for your help.
December 7, 200520 yr Hey, Thanks so much. That's exactly what I needed. The script works just the way I wanted now. If you don't mind me asking you one last question though. In a custom dialog with an input field is there nayway to make it so that a user has to enter a value. Well anyway thanks so much for your help. Yes in custom dialog use the field you want to do the find on.
Create an account or sign in to comment