Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7999 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

This topic is 7999 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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