RemoveValue ( listOfValues ; valueToRemove )
Removes all instances of a value from given list, disregarding case
Be the first to rate this function Log in to vote
Douglas Faneuil - Show more from this author
n/a http://n/a |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function removes a specified value from a given list without recursion:
• no matter how many times it appears
• no matter how many repeating (stacked) instances exist*
• no matter the case**
*Technically, this function can handle up to 426 repeating instances before failing (ie, leaving a value intact). This limit only applies to back-to-back values (eg, "Cat¶Cat¶Cat"). Otherwise, there's no limit; I've tested more than 100K removals successfully.
**With regard to case, four arrangements get removed: all caps, all lower, titlecase, and as-input. Funky entries like "PeoPLe" will be skipped unless specified.
Note! This function contains another function — SuperTrim ( text ) — which is used to trim lists of leading/trailing carriage returns (¶). All lists get trimmed in the end.
Finally, I wrote this because a lot of similar functions were failing to remove instances of back-to-back values, especially those topping a list. And I wanted various cases to be addressed as well. No attribution necessary. Enjoy!
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.