Brian Dunning's FileMaker Custom Functions

ReplaceValues ( listOfValues ; startingValueNumber ; numberOfValues ; replacementValues )

Replaces multiple values in listOfValues with replacementValues.

  Average rating: 4.1 (42 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:
ReplaceValues (
"a¶b¶c¶d¶e" ;
3 ;
2 ;
"1¶2¶3¶4"
)
  Sample output:
a
b
1
2
3
4
e

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

Replaces multiple values in listOfValues with replacementValues. Value replacement begins at the startingValueNumber value and continues for numberOfValues values. Compare to the SubstituteValues custom function (http://www.briandunning.com/cf/851).

The function behaves exactly like the native Replace() function, except it operates on a list of carriage return-delimited values instead of characters. Same as with Replace(), you can "insert" replacementValues into listOfValues by specifying 0 as the numberOfValues parameter.

As with all value functions, the result of ReplaceValues() has a trailing carriage return.

This function is NOT recursive.

 

Comments

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: