Brian Dunning's FileMaker Custom Functions

SubstituteValues ( listOfValues ; searchValues ; replaceValues )

Substitutes multiple searchValues in listOfValues with the corresponding replaceValues.

  Average rating: 4.1 (56 votes) Log in to vote

Michael Horak   Michael Horak - Show more from this author
*COMMENT Visual Realisation

Share on Facebook Share on Twitter

  Sample input:
SubstituteValues ( "A¶B¶C¶D¶E" ; "B¶D" ; "2¶4" )
  Sample output:
"A¶2¶C¶4¶E"

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

Substitutes multiple searchValues in listOfValues with the corresponding replaceValues. If there is no corresponding replaceValue, the searchValue is removed from listOfValues.

 

Comments

Bruce Robertson   Bruce Robertson
Jul 6, 2015
Still has the same problematic result for me:

SubstituteValues ( "aa¶bb¶cc¶aa¶aa¶aa¶dd" ; "aa" ;"")
=> bb¶cc¶aa¶dd¶
 
comment   comment, VR
Jul 7, 2015
@Bruce Robertson: I am afraid I cannot reproduce the problem.
 
Bruce Robertson   Bruce Robertson
Jul 7, 2015
OK. But I can.
 
comment   comment, VR
Jul 7, 2015
@Bruce Robertson: You are right, I did not perform the update correctly. Fixed now.
 

Log in to post comments.

 

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

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: