March 30, 201510 yr Hello again! I have few users on my db, being only one the admin that has full access, all the others have access only to specific layouts with an specific privilege set. All fine, everything works. The thing that is causing me problems is I want to have a "portal" layout that says a simple stuff like "Welcome, Admin" or "Welcome, user1" based on the Get(AccountName), then I want to have a button that goes to the layout based on a calculation that is like: Go To Layout [Get(AccountName) & "menu"] and the result is like "Adminmenu" that is the exact name of the main layout for that account. The thing is, all that system works perfectly fine with the main account but even if I close the file and log back with any account that is not the main, it will show as the main account (Admin) was still logged, so text will go "Welcome, Admin", button won't work etc, even being logged into "user1" account etc. Tried the whole thing with Get ( UserName ), same results. What am I doing wrong? Thanks. Same happens with "Get ( AccountPrivilegeSetName )" it only displays and "gets" the info from the main account. Edited March 30, 201510 yr by Morenomdz
March 30, 201510 yr Author Found the problem. The calculation must be check no storage, also, looks like the Get (Username) looks for the user account logged into your OS and not FM. It is working so far. Thanks again!
March 30, 201510 yr You shouldn't need a separate layout for each user. In fm12 or higher you can place get() functions directly into layouts in text boxes. All you need is a text box that says: Welcome, {{AccountName}} This should dynamically give you the username of the currently logged in account. Also, I believe that get(username) actually gives you whatever the user has specified in fm preferences.
March 30, 201510 yr looks like the Get (Username) looks for the user account logged into your OS Just the first time it is set, not dynamic. And it can be changed by the user in the FM preferences.
Create an account or sign in to comment