Custom Function - Corrupted?

I have a custom function that I can't edit. It has worked all along and continues to work. I would normally create a new version, go to the places it is used and change to the new one, then delete the old one. It has been in use for a couple of years and is used in over 1000 places according to FMPerception. Here is the function.

If I simply click the OK button (no edits necessary but get same error if I edit the function), I get an error saying "The name Option is already in use...". See screenshot.

CF Error when saving

If I duplicate the function, open it up and either edit it or just click the OK button, I get the same basic error but with the new name.
CF Error when saving a copy

We discovered this in the DEV version (running on a separate DEV server) of our database. When I go to the current Production version running on our Production server, I get the same errors.

We make a clone along with our nightly backups. I went back to several clones from both DEV and Production and tried opening them locally on my Mac. Same errors.

I did a recover on one of the clones. The recovered clone file has the same errors.

In FMPerception, I looked at the Custom Functions list. There are No duplicate internal ID numbers listed and No duplicate custom function names.

Are there any other suggestions to try? Has anyone else by chance run into something like this?

Thanks,
Doug

Hi,

what version of FMP are you using ? This Having problem updating custom function.. (claris.com) may help you. This one also Faulty error dialog (claris.com).

1 Like

Have you created any custom-function that has the name of any of the parameters in your 'option' CF?

If you have done so, the error as you describe will occur

3 Likes

While 'Option' seems not to be a reserved word for FileMaker, it is definitely a reserved word when it comes to SQL
https://support.claris.com/s/article/Reserved-words-in-FileMaker-Pro-1503693036814?language=en_US

I would guess that there is another Function (not sure if Plugins count as well) with that name - and I would recommend to avoid any reserved word (use something like 'TheOption' or whatever)

Thanks so much to @planteg and @menno. The issue was that I had another custom function with the name of "Value" which matched one of the parameters of this custom function.

This is a tidbit to file into my "tips" database for sure.

Regards,
Doug

1 Like