# Custom Function - Corrupted?

**URL:** <https://the.fmsoup.org/t/custom-function-corrupted/3465>\
**Category:** Questions\
**Tags:** filemaker, custom-function\
**Created:** [March 21, 2023, 5:31pm UTC](https://the.fmsoup.org/t/custom-function-corrupted/3465 "2023-03-21T17:31:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bowdendata](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@bowdendata](https://the.fmsoup.org/u/bowdendata)\
**Post date:** [March 21, 2023, 5:31pm UTC](https://the.fmsoup.org/t/custom-function-corrupted/3465/1 "2023-03-21T17:31:15Z")

</div>

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.

 ![Custom Function](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/6/60d88f136f3a67768b0b0ea02f4b0da6abc3ee89.png)

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](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/0/06572fb2c9d6a3c44359b6a54664ef5e0d9776df.png)

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](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/9/92dc3a49f4d963c42d20f7e4a1d9d262d57adbfc.png)

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

---

<div class="post-metadata">

**Author:** ![planteg](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/planteg/32/627_2.png) [@planteg](https://the.fmsoup.org/u/planteg)\
**Post date:** [March 21, 2023, 5:57pm UTC](https://the.fmsoup.org/t/custom-function-corrupted/3465/2 "2023-03-21T17:57:39Z")

</div>

Hi,

what version of FMP are you using ? This [Having problem updating custom function.. (claris.com)](https://community.claris.com/en/s/question/0D50H00006tgEQTSA2/having-problem-updating-custom-function) may help you. This one also [Faulty error dialog (claris.com)](https://community.claris.com/en/s/question/0D53w00005DD2BwCAL/faulty-error-dialog).

---

<div class="post-metadata">

**Author:** ![menno](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/menno/32/2016_2.png) [@menno](https://the.fmsoup.org/u/menno)\
**Post date:** [March 21, 2023, 7:27pm UTC](https://the.fmsoup.org/t/custom-function-corrupted/3465/3 "2023-03-21T19:27:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Markus](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Markus](https://the.fmsoup.org/u/Markus)\
**Post date:** [March 22, 2023, 7:18am UTC](https://the.fmsoup.org/t/custom-function-corrupted/3465/4 "2023-03-22T07:18:19Z")

</div>

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](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)

---

<div class="post-metadata">

**Author:** ![bowdendata](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@bowdendata](https://the.fmsoup.org/u/bowdendata)\
**Post date:** [March 23, 2023, 2:10pm UTC](https://the.fmsoup.org/t/custom-function-corrupted/3465/5 "2023-03-23T14:10:06Z")

</div>

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
