March 24, 200421 yr This is a neat little VBScript that pulls the user's logon username, as well as computer number, and saves it to a text file on the hard drive. (Note: Windows only) The script can be executed through a Send Message step when opening the database, and the data can be imported to not only assist in custom file permissions (field-level, if you so desire) but also to create logs of who accessed your database system. So you don't even need a password-based login system, this script is basically flawless. I'd be happy to provide an example database if needed. Note: When using calling this script from Filemaker, and importing data from the text file, it takes a few seconds after executing the VBScript for the text file to become available for Filemaker to import. To make sure this goes error free, use a script step like the one that follows: Allow User Abort [Off] Loop Import Records ["username.gm"] Exit Loop If [status(CurrentError)=0] EndLoop Allow User Abort [On] If that file can't be found, it will return an error, which will cause the script to loop again. The loop will only be exited once the necessary data has been successfully imported. Version: v6.x Platform: Windows 2000 UsernameScript.zip
April 22, 200421 yr Can you send a sample database to show me how you use the script to "read" passwords to set privileges on opening the database??? FileMaker Version: 6 Platform: Windows 2000
Create an account or sign in to comment