Brian Dunning's FileMaker Custom Functions

ReplaceOnMultipleValues ( Value ; Start ; NumberOfCharacters ; ReplacementText )

Execute "Replace ()" function on each line of multiple lines.

  Average rating: 4.0 (3 votes) Log in to vote

Koji Takeuchi   Koji Takeuchi - Show more from this author
TonicNote, Inc.
https://tonicnote.com

Share on Facebook Share on Twitter

  Sample input:
ReplaceOnMultipleValues ( "aaa¶ccc¶bbb¶abc" ; 2 ; 1 ; "-" )
  Sample output:
a-a
c-c
b-b
a-c

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

description:
Execute "Replace ()" function on each line of multiple lines.
This function was created for the purpose like splitting text from fixed-length data like Firm-Banking data.
ex1:
ReplaceOnMultipleValues ( "aaa¶ccc¶bbb¶abc" ; 2 ; 1 ; "-" )
-> "a-a¶c-c¶b-b¶a-c"
ex2:
ReplaceOnMultipleValues ( "aaa¶ccc¶bbb¶abc" ; 2 ; -1 ; "," )
-> "a,aa¶c,cc¶b,bb¶a,bc"

 

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: