Database Reference
In-Depth Information
Add Account
FileMaker lets you add new accounts to a database from a script—and for good reason. If
you build a system that uses several databases, and you can't use external authentication,
then the Add Account step is your best friend. Instead of adding each account to all your files
manually, try this: Write a script that asks for the account name and password with a custom
dialog box, and stores them in global fields. Then use scripts in each file to add the same ac-
count to every file at once. When you're all done, be sure to clear the password from the
global field to protect it from prying eyes.
Or, if you have to populate your brand-new file with a huge number of people when you're
first installing your database, then you save tons of time creating accounts if you have an
electronic list of user names and passwords. Import them ( Import Data Sources ) into a table
and then use a looping script ( Finishing the Process Timeslips Subscript ) to create hundreds
of accounts in a few seconds.
TIP
The Add Account step lets you specify the account name and password by using calculations, but
you have to select a specific privilege set for all users in the loop. If you want to script the creation
of accounts with different privilege sets, use the If/Else If steps and several copies of the Add Ac-
count step, each with a different privilege set selected.
Delete Account
If you're going to create accounts with a script, why not delete them, too? The Delete Ac-
count script needs only an account name—and you can supply it with a calculation. With this
script, you can build the other half of your multifile account management system.
WARNING
If you write a script that adds or deletes accounts, then pay special attention to its security settings.
You can all too easily give a database the tightest security FileMaker allows and then leave a gaping
security hole through a script. Customize privilege sets so that only you (or a trusted few) can run
the script, and don't put it on the Scripts menu.
Reset Account Password
If lots of people use your database, then forgotten passwords will undoubtedly become your
worst nightmare. You could spend all day changing passwords for people. Why not write a
script that can reset a password to something generic and then email it to the person? If you
Search WWH ::




Custom Search