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é - Show more from this author
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.

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: