Depending on who logs in, I want to send that user to a specific layout. I have a script that runs when the file is opened. Note: The syntax below is paraphrased, but correct in the script).
If (get (accountName) = "Joe" or get (account name) = "Jack")
Goto layout a
GoTo layout b
Seems simple enough, but it's not working. I went to may laptop and created a file with one field. In the manage security window I set up an account name (Jack) and password (123) and logged into the database using those credentials. I then did a replace field in the one field of the database with a calculation - get (accountName). In this case it replaced the contents of the field with the expected log in name (Jack).
Next I went to the database that I want this to work on, which is hosted on my server. Once again, I logged into the database using the same credentials (Jack as the username and 123 as the password). I found for 1 record and did a replace field contents in a text field. Once again I replaced with the calculation get (accountname). This time, instead of replacing with the expected name (Jack) it replaced with my user name (Jeff).
Can anyone explain why it brought up a different name when the same log in credentials were used for both databases?
Does one file being local and the other hosted make a difference in the Get (accountname) function?
Thanks for you help.