Brian Dunning's FileMaker Custom Functions

RepeatSerializedValue ( Text ; StartingNum ; NumRepeat ; TextReplace )

Returns a repeating list with a serialized counter

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

  - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
RepeatSerializedValue ( "I have @FM Dogs"; 1; 3 ; "@FM")
  Sample output:
"I have 1 dogs¶I have 2 dogs¶I have 3 dogs"

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

This is based on the RepeatValue function by Koji Takeuchi.

This returns a repeated ¶ separated list to include a serialized counter.
Text = The value to repeat.
StartingNum = The starting Number of the incremental counter.
NumRepeat = The number of times to repeat the text.
TextReplace = The value to be replaced by the incremental

If StartingNum is one (1), then the first serialized value is 1. If StartingNum is 20, then the first serialized value is 21.

Example
#1) RepeatSerializedValue ( "I have @FM dogs"; 1; 3 ; "@FM")
#2) RepeatSerializedValue ( "Chapter @FM"; 10; 3 ; "@FM")

output
#1) "I have 1 dogs¶I have 2 dogs¶I have 3 dogs"
#2) "Chapter 11¶Chapter 12¶Chapter 13"

 

Comments

unix   unix, Japan
Nov 16, 2015
Why "If StartingNum is 20, then the first serialized value is 21." , not 20?
Rather than you can't get result starting with 2.
 

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: