Thank you for your post.
I am unable to replicate the problem with FileMaker Pro 11v2 on Mac OS X 10.6.4, 10.5.8, and Windows XP. Here is what I did:
I created three custom functions:
a3 = Abs(a)
a2 = 1 - Mod (a; 2)
a1 = a3 ( a2 (a)) * 2
I left that file open, created a new database file, went into Custom Functions and imported the three custom functions. No problem.
Obviously, this is a simplistic case, so it may be better if I take a look at a clone of your file so I can try it here. Check your Inbox at the top of this page for instructions where to send the file.
Thanks for the reply. I have done some more work on this, and have narrowed the problem further.
When I went back and tried to recreate the problem, at first I couldn't reproduce the problem either. But I took your example, and worked with it.
The mistake I had made was that it turns out it doesn't matter if the file is open or closed.
What matters is that you don't import all referenced functions.
If you accidentally leave off a referenced function, then the import happens, no errors are reported, but the imported functions get modified: they get disabled with comments.
To reproduce: take your example, but just import functions a1 and a2. Function a2 will be fine, but function a1 will be commented out, as it references a3, which doesn't exist.
The import routine knows something is wrong -- it commented out the function -- but it doesn't report an error.
There is a mention that references are not imported in the dialog box that reports the import results. However, if the code knows that it needs to comment out a function, it should report that as an error and log it. It should log which function was modified, and why. ("Function a1 disabled as it references missing function a3.") It can be very hard to track these errors down. You have to look through each function, find which ones have been commented out, check each referenced function to see which one is triggering the string of defaults...
(As it was, it was hard enough to figure out what exactly the bug was...)
If you can, you may want to change the title of this to "Importing Custom Functions from another database can silently fail".
Thanks for looking at this.
One other thought:
I was not able to reproduce the circumstances under which "<Function Missing>" was inserted into a script.
Whoever looks at your source code should check and see when that gets used and make sure that it triggers a log entry and an increment to the error count.
I received your email. Thank you.
I am able to reproduce your findings. An unreferenced function is commented out, and there is no warning this occurred during the import.
I have forwarded your posts along with my findings to our Development and Software Quality Assurance (Testing) departments for review and confirmation. I will keep you posted as information becomes available.
Our Testing department has forwarded this issue to our Development department for further review.