Brian Dunning's FileMaker Custom Functions

OvertypeMistakes ( text ; fixList )

Text-input word corrector for upper/lower case typos

  Average rating: 3.9 (42 votes) Log in to vote

Edward L. Scott   Edward L. Scott
Scott Resources

Share on Facebook Share on Twitter

  Sample input:
apple has sold ipads in the ussr and nyc after designing components with autocad.
  Sample output:
Apple has sold iPads in the USSR and NYC after designing components with AutoCAD.

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Written as a triggered script originally, then customer needed it to work in Instant Web Publishing, so I re-wrote it as a recursive custom function.

This is a recursive function to correct case-related typos in textual data-entry fields. It was requested by a fellow developer whose customer wanted a way to automatically clean up data entries sloppily typed in by Instant Web Publishing users. Parsing is accomplished word-by-word rather than character-by-character.

The correctly typed "fixList" parameter may be easily maintained as a return-delimited-list global field in a Preferences table. The function can (should) be invoked by defining the "text" input field as an auto-calculation that recalculates itself upon field exit. The function is implemented as a recursive loop as limited by the number of words in the calling "text" parameter, and a nested loop within that loop as limited by the number of words-to-fix in the "fixList" parameter. When every individual word in the "text" input has been compared to every individual word in the "fixList" parameter (and modified as-needed using a Substitute function), the function then exits via the second Let statement which first nulls out (destroys) the global variables (i.e., $$...) and then returns the "fixed-text" local (i.e., exists only within the custom function) variable.



Hans Nagelgast   Hans Nagelgast, None
May 25, 2014
Could you give an example of the Fixlist, I am not able to reproduce your results
Hans Nagelgast   Hans Nagelgast, None
May 25, 2014
OK, well I have figured it out. The Fixlist only contains the correctly spelled words and the input text simply replaces these values. Thanks, nice function.

Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.