Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Displaying Full name vs. UserName

Featured Replies

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?

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.

... 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.

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.

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

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

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.

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!

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.