- You can set a file to "run with full access privileges". If you only need a higher level of access for a specific script to work, select this check box in the script editor.
- There's a re-login script step that can specify an account name and password while re-logging back into the current file. You will probably need to use Get (AccountName) and Get ( AccountPrivilegeSetName) to capture key info about the current user before doing this so that you can return the user to the correct level of access after the need for a different access level has passed.
- FileMaker Files can be set up as "opener" files that perform a script to open another FileMaker file with the same account name and password as was used (via an auto-enter setting in File Options) to open the "opener" file.
Thank you for the response PhilModJunk. It certainly looks like a lot of the stuff I want to do can be covered by your suggestions. Regarding point 2 where you mention about relogging in with the current user, that wouldn't work if they set their own password, would it?
It would require that you have a table of account names and passwords in your file so that you can use the account name to look up the password. Either that or your script would have to log them back in using a generic account name and password that happens to have the same privilege set specified. (Which could affect how other parts of your system that might need the correct account name to work properly.)
I'd use option 1 myself if at all possible as that leave the use logged in under their account and password.