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.

Featured Replies

Does anybody know how to capture the 'No Records' alert returned from FMP. Rather than have the alert displayed, we want to perform other actions on this condition.

Thanks.

Garry

Just before the Perform Find step, insert the Set Error Capture [ON] step. Or it may be [Off] -- I can never remember whether ON disables FMP's error capture, or enables it!

The error capture step will disable all FMP error messages. Just be careful, because now YOU are responsible for trapping errors. I'd be very cautious following a find with a delete found set step -- check that the whole database isn't found before deleting anything.

If you want to actually capture the error code itself then it's a bit trickier. Still use the set error capture step before perform the find (or whatever). Then you'll need a global field and use a Set Field [gfield=Status(CurrentError)] step immediately after the find (or whatever) to remember the error code, then use the value from the global field later in the script.

If you can put the script step that uses the error code immediately after the find (or whatever) step then you don't need the global field and set field step.

  • Author

Thank you. We will try that.

Garry

Set Error Capture (on) traps errors and suppresses error messages.

-bd

  • Author

Thank you Vaughan and -bd. I was actually asking about the CDML tags. However, we just discovered that "-err" is not the same as "-error", in fact "-err" does nothing. I have been using "-err" since I started CDML in Feb this year.

Thank you.

Garry

Well in that case, specify an error format file using the -error CDML tag. In the error html format file...

[FMP-If: currenterror=401]

Stuff that should be displayed if no records are found: exactly what depends on the situation. In a forum I've made, the error page is a copy of the main forum list except where the messages would appear it says "no messages" and the form for posting is underneath.

[/FMP-If]

Note carefully: if the error page is returned it means that the action failed (this is not necessrily a bad thing). What is important is that Web Companion cannot return any record-dependent information (fields, even global fields) because it has no found records.

If you want to "trap" for more than one error condition you can include more than one If on the error page. I usually use if/else and nest them, with at least one else containing a generic message to display for unexpected unspecified errors.

  • Author

Thanks Vaughan. We are using -errnum=401 in conjunction with [FMP-If: CurrentError=401] and all is well. It was the dreaded -err instead of -error which caused our grief.

The other advice for scripts capturing error messages, from you and -bd, is also very valuable.

Thank you.

Garry

Create an account or sign in to comment

Important Information

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

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.