Jump to content

Get(AccountName) & Get ( UserName ) problems


This topic is 3597 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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 by Morenomdz
Posted

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!

Posted

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.

Posted

 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.

This topic is 3597 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.