Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Displaying Full name vs. UserName


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

Recommended Posts

Posted

I would like to display the Full Name of the Current User logged into the system

I currently have an opening script that captures the AccountName and sets the CurrentUser Field but the account names are like JDOE and I want to show "Welcome: John Doe".

Any way I can do this?

Posted

What you could do is create a USER table that would hold information unique to each user. You could have fields for the user's first name, last name, phone, fax, email address, title, etc. In the table you would also have a field that would match the user's account name. Then you could have your opening script perform a find based on the Get ( AccountName ) function. It would return all of the specifics about the user that just logged on.

That's the general idea.

Posted

... just relate a users table to that field you set to the account name... then on login goto the related record, set variables or globals = your users names, mobile numbers whatever and then utilize those throughout the database.

Posted

If you're using External Authentication then creating a user table would mean you'll that data in two places: the Active Directory and your FM file. So you'll need to update it in two places and create a new record for each new user ... kind of defeats the benefit of using EA. (Apart from the inherent security risk of storing security data as regular data).

You can use a VBscript to query the AD for the user's full name and import that into FM.

Posted

Get the users to set their full name into FMP's preferences... then use the Get( UserName ) function.

Posted

...hmmm.. i didnt even know there was a get (username) function.. is there anyway to script this in when generating an account?

Posted

No, it's stored in the registry and FM scripts can't touch that. You'd need to use OS-level scripting for that and then integrate that in your FM scripts.

Beware though that if another user logs in to that machine and uses FM, the get(userName) result will not be correct. Unless you use a Windows logon script that queries the AD for the user's full name, writes that to the registry.

Posted

Wim,

You can use a VBscript to query the AD for the user's full name and import that into FM.

For us mere mortals this is easier said than done. Do you have an example that specifically shows how this is done? I'm interested in the VBS portion, the import I can figure out.

Thanks!

Posted

Download the VBscript repository from my website. Look in the AD section for "List Account Page Information for a User Account".

This topic is 6868 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.