Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scripting a find failure

Featured Replies

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.

Try Use Set Error Capture[off,on] script for your problem may be it will help you. To me its help.

  • 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.

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

  • 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.

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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.