Get (AccountName) in a script can be used to identify what account was used to access the database. If you have a table of account names in your database, you can match the account names there to the value returned by get ( accountname ). A field in this table can store the preferred layout name or layout number for that account so that your script can find this record, then use the data in the layout field to select the appropriate layout.
Thanks for you answer. Let me ask a few more questions by breaking down your answers.
For "If you have a table of account names in your database, you can match the account names there to the value returned by get ( accountname )" It looks like I need to set up a relationship between two tables. Which two tables? Also, which fields do I relate? Does the field in one of the tables need to be a calculated field with value as "Get AccountName).
If this is a script, how/when do a I activate the script to do this function?
You need only one table and no relationships are needed.
A script to select the layout would look like this:
Go To layout [UserTable (UserTable)]
Enter Find Mode//clear the pause check box
Set Field [UserTable::AccountName ; Get ( AccountName ) ]
Set Error Capture [on]
Perform Find 
If [ get ( FoundCount ) ]
Go To Layout [UserTable::Layout ]
#use layout name or layout number by calculation options depending on whether you enter the name or number of the layout into this layout field.
Go To layout [//Use a layout with text on it to display an error message as UserTable didn't have a record for this account name]
You can use File Options to specify that this script (or one like it) be performed each time the file is opened.