Brian Dunning's FileMaker Custom Functions

_ReplaceValue ( pText ; pSearch ; pReplaceText ; pCounter ; pMaxCounter ; pSwitch )


  Average rating: 4.5 (23 votes) Log in to vote

Matijas Federspiel   Matijas Federspiel

Share on Facebook Share on Twitter

  Sample input:
G_TX_ReplaceValue (pText ; pSearch ; pReplaceText ; pCounter ; pMaxCounter ; pSchalter )

(Value=Hallo 2¶2 Hallo¶Hallo)

Search = Hallo 2
Replace = Meier

  Sample output:
2 Hallo¶

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

2014 © by Matijas Federspiel, ComZuWeb-DataSystem from Germany

Mit dieser Funktion kann man in MultilineValues einzelne Values austauschen mit und ohne case sensitive.



Herve   Herve, France
May 9, 2014
There's a typo in line
vSchalter= Case (pSchalter="E";vExakt;pSchalter="V";vVerify);

Should replace "pSchalter" with "pSwitch" twice.


Oliver   Oliver, Tegernsee
May 9, 2014
IMHO, you should …

1. add the function signature to the internal comment, and be clear about the arguments that can be passed, and their function ('pMaxCounter = ZählerMax' … that's enlightening!)

2. use consistent naming in the sample input, the function name and the function itself

3. apply proper formatting and whitespace

4. use better variable names, and avoid confusing re-assignments in mid-calculation

5. learn how to use Let[] variables effectively, including implicit creation of boolean statements without Case()

6. be aware that ¶ is not a string, but an operator, and on its own doesn't require quotes

7. test your CFs with the actual code you're posting; this one doesn't work as advertised, even when using the correct argument name

8. write in English only, and use a spell checker

Apart from that: not bad … :-)
Matijas Federspiel   Matijas Federspiel, Germany
May 9, 2014
but excuse my english is not very good :-/

- all error out -

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.