InsertChar ( inText ; insertChar ; atInterval ; outText )
Insert character at regular intervals within text
Average rating: 3.9 (45 votes) Log in to vote
where the field TO::GeneSeq contains "ATTTCTTTTTTTCCTCTTTC"
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Tail recursive custom function that inserts the specified character at the specified interval.
Mar 14, 2015
|Yout formula ruins my file!!!!! got into a loop can't get rid of it|
Aug 6, 2015
|- Uses a parameter name that is the same as the function name. FileMaker 13 complains about this.
- atInterval is not checked for zero or negative values
- otherwise function runs fine
|Arjen van der Ree, Amsterdam
Oct 26, 2015
|Worked fine for me I altered the function first:
1. renamed to 'InsertCharacter'
2. slight code change:
addText = Left ( inText ; atInterval);
nextText = Right ( inText ; Length ( inText ) - atInterval );
outText = outText & Case ( Length ( outText ) > 0 ; insertChar ) & addText
Case ( Length ( nextText ) > 0 ; InsertCharacter ( nextText ; insertChar ; atInterval ; outText ) ; outText)
Don't care much for the outText-feature but I'm not complaining !
Thnx again, real time saver !
Cheers, Arjen van der Ree
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.