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.

Related file open error

Featured Replies

Hi All,

Is there a way to trap the error that is produced when a related file

is not found as you open the "parent" file??

In an open script, i am trying to test to see if a related file is present

& if not found to open the "Open Remote" window.

My problem is that FM seems to trigger an error BEFORE my open script runs so I never get to direct the user to where i want him to go.

Thanks

Dan

Set Error Capture. The code for your error is probably 100 (File is Missing); use Get ( LastError ) and if that's equal to 100 (or maybe just > 0) then Open Remote.

  • Author

I am using the error capture...

What seems to be happening (because my parent file has a related file,

via "File, Define, File Reference..." ) is that FM can't find the related

file and shows the "Open File" dialogue.

My start-up script never has a chance to even start!!

How can i make sure my script starts BEFORE FM tries to "link" to the remote file that it can't find?

Dan

Dan:

FMP shouldn't look for the related file if there's nothing in the current layout from that file. Make a new layout that's blank and start from there.

-Stanley

  • Author

Hi Stanley,

Thanks for the info...

Maybe I am going about this all wrong...

This is what I do in my start-up script:

Error trapping is ON

I go to a splash screen (based on a table that is in the current file.

(so no related file not found error problem...so far)

That way (based on your info) I know that my start-up script runs before

FM generates any kind of error. - This works so far.

then i switch to a layout that HAS A RELATED table from another file.

Then i have an IF statement to trap for error <> 0.

My thought was that switching to this layout would trigger an error since

the related file would not be found.

All i get is the layout with the words <file missing> where data should be.

It's just like if the If never resulted in a "Yes".

If i turn OFF error trapping then i get the file not found error.

Is there a way to open the related file in both MAC & PC but keeping it hidden??

Maybe I need to try to open it to force an error message and not just

rely on the fact that required info for a layout will be missing,

and assume that missing info will be enough to trigger an error.

Any thoughts??

Maybe my If statement should test for something more specific then

LastError <> 0??

Thanks

Dan

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.