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

When does FM kill a reference to external script

Featured Replies

This question relates to relationships also:

For navigating through (related) files I use a script calling an external script, that goes to a layout in that external file, to switch from file to file.

In some cases, the reference to the external script is deleted by Filemaker, when it can not be found I suppose. I wish FM did not..

My question is, is there a 'plan', or a system FM uses to delete those references to external files? In other words, what to do to avoid FM to 'update' the references to 'unknown'? Does it update references in a FM-file when you 'Save a copy as"? Or is it always obliged to have the related file where the script refers to, there? Hope you understand my point.

Meanwhile, a healthy and happy 2003...

Harryk

  • Author

Reply to my own question:

A lot of hours experimenting further, I think I know the answer to my somewhat cryptic question about disappearing external script calls, and mixed-up relationships.

I have a database planned to be a solution. That database is a mainfile and an archive-file, both are identical, and related.

The main file is planned to be on yearbase. So after a year, the main file is replaced by a copy of it, most information is wiped out of it, some information (permanent info, address etc) kept in.

To anticipate the future I have made dummy-files for the upcoming years. In the mainfile is a button-reference calling those dummy-files.

When the time is there (and that's the start of this happy new year..) I thought, replace the dummy file with a 'real' file, and voila.

But that's wrong. The dummy file is a very short one, and allthough the name of the match-field and the name of the get_in_from_outside script is the same as the real-file with which the dummy should be replaced in the future, FM does not catch them, because internally I think FM does not seek for identical names but for reference-numbers when it comes to 'finding' the matchfield and the script in the external file.. FM finds a file that is organized in a different way, and gets mixed up..

I think it works that way..

harryk

It is not the field (or script) name that is maintained thru relationships but respective ID.

First find (thru get field id) the fields IDs of any involved field (either in relationship or in some script step).

Do the same thing with all script you'll need to call.

Now, create an dummy file with enough fields and dummy scripts (of course the name of this dummy file has to match the name of your original file).

Point the right fields and scripts (using their Ids) from the rest of your files.

After when you replace the dummy with real file everything will work fine.

Dj

  • Author

I think I will leave out the dummy files. Instead I capture the file-not found error when the user clicks the buttons leading to the external files, but I will set up the main file using the main-file copies as the files to point to. Then I'll save the main file. One thing I'm not 100% certain of, is when the <file missing> appears, the old not-valid references keep intact, but I think they will.

That way, when the user places a copy of the main file (for instance, after 2003 he will make a copy of main.fp5 and rename it to 2003.fp5 so that the information of 2003 is still available from the solution), when he does that, the file will be accessible.

I hope. Must try out.

Thanks for the tips.

Harryk

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.