Brian Dunning's FileMaker Custom Functions

RandomString ( text ; number )

generates a random string of characters of specified length.

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

Rob Westergaard   Rob Westergaard - Show more from this author
DataStorm Solutions
http://www.DataStorm-Solutions.com

Share on Facebook Share on Twitter

  Sample input:
RandomString ( "abcdefghijklmnopqrstuvwxyz1234567890!@#$%&*+?" ; 12 )
  Sample output:
%j4#oka849uy

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

Recursive function to generate a random string of characters of specified length. Don't use this in a calculation field, since Filemaker will evaluate the numeric "Random" function each time you refresh the calculation. This is helpful in a script step or auto-enter calculation for creating paasswords, for example.

 

Comments

Jeff Dressing   Jeff Dressing
Mar 18, 2021
This doesn't work if you pass in the number that is the length of the text. I am wanting to randomize a string. Something like: "abcdefg". -> "daegcfb"
 

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: