Brian Dunning's FileMaker Custom Functions

stringWithParams ( string ; paramList )

Function that substitute parameters in a string. The parameters are placeholders with a specific format. This function act some sort like the printf function in C.

  Average rating: 4.3 (38 votes) Log in to vote

Nicolas Bourré   Nicolas Bourré
http://Www.nicolasbourre.com

Share on Facebook Share on Twitter

  Sample input:
stringWithParams ("My name is %3, I am %1 years old and I do love %2 for dinner."; "52¶potatoes¶John Smith")
  Sample output:
My name is John Smith, I am 52 and I do love potatoes for dinner.

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

Function that substitute parameters in a string. The parameters are placeholders with a specific format. This function act some sort like the printf function in C.

The format of a placeholder must be %X where X is the index number of the parameter in the list.

Might be useful for multilingual solution.

 

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.

Under construction. Email me your wish list for improvements.