4 Replies Latest reply on Mar 2, 2016 10:32 PM by beverly

    Check for illegal character in Filename

    peteraddison

      Preamble: When exporting or saving as pdf (or xls) an illegal character in field (for instance a colon) can create an illegal file name preventing the file from being written to disk. This situation generates a somewhat cryptic message stating [filename] could not be created on this disk.  Use a different name, make more room on the disk, unlock it or use a different disk.

       

      I have a field that is user-entered that becomes part of the filename. I want to delete any illegal characters in the file name.

       

      I thought of creating a custom function that would check, for illegal characters and warn the user, but for some reason it doesn't work, there's something I'm not understanding about custom functions.

      Custom Function.png

       

      I put it in a script that triggers when the field is exited:

      Script.png

       

      I also tried it without the "=1" assuming that it might be return just true or false. It worked equally well. (that is, it didn't work either way)

       

      Two questions:

      1) What am I not understanding

      2) Where do I read up on using custom functions