FilterFileName ( text ; filetype )
filtering field contents as a file name when exporting record set to Excel or Acrobat file
Average rating: 4.5 (34 votes) Log in to vote
Michael Myett - Show more from this author
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
FileMaker allows you to export record sets to either an Excel or Acrobat file. If you are using a scripted export routine using some field contents as an automated file name, this function will filter any characters that would cause a illegal file name ( in windows ). This will avoid an error when running your script, by removing illegal characters.
For example, use the formula to set a variable in a script which exports a record set to an Excel or Acrobat file. The variable would create a filtered file name with illegal characters removed. This is good for Windows only. Sorry. I don't have access to a Mac to work that out and believe there are some different characters. Anyone who would like to add to this for Mac, feel free.
Make file type = 1 to add a Excel file extension to file name or file type = 2 for Adobe Acrobat file extension.
Mar 3, 2011
|I would change the second parameter to be the extension. That way this function could also be used when exporting container contents.|
Mar 28, 2014
|Exactly what I was looking for. Thank you so much!|
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.