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.

How to get the OS username?

Featured Replies

I need to get the username when a record is created or modified. The built in method of auto-entering this data won't work for me because of a couple issues. First, users forget to update the Application Preferences and we have some users accessing FMP through Terminal Services so we get duplicate usernames. Is there another method of getting an OS username into FMP when a record is created or modified?

Yep: a Windows logon script (ask your network admin guy about this) that changes the section in the registry where FM stores the username:

HKEY_CURRENT_USERSoftwareFileMakerFileMaker Pro6.0PreferencesUser Name

Make the logon script write the current Windows user name there.

It needs to be a Windows logon script because the data needs to be written before FM launches. If you changes it after FM is launched, it will have no effect.

  • Author

Thanks for the help. I don't actually have a Network Admin to help me. I've done some looking around and can't seem to find exactly what I'm looking for. Do you happen to have an example of a logon script I can use? Thanks in advance.

Explaining how to use Windows Logon scripts would take too much time and it depends on your setup. So I suggest you look at the help section of your Windows server and do a google on the subject.

Here's a generic script you can use. It makes sure that the TCP/IP protocol is active for FileMaker and writes the Windows user name to the FileMaker preferences:

' ===================================================

'

' Script created by Wim Decorte - Connecting Data.

' 20050114

' All rights reserved.

' © Connecting Data - Wim Decorte

'

' This is a generic Windows Logon Script that sets

' the FileMaker network protocol to TCP/IP

' and writes the current Windows User name to the

' FileMaker preferences section.

'

' ===================================================

'

Option Explicit

'

' Objects

' -----------

Dim wshshell 'Windows Script Host Shell

Dim oNetwork 'Network Object

'

' Registry key to read/write

' ---------------------------

Dim Key

'

' Some FileMaker preference Key & value variables

'-------------------------------------------------

Dim keyNetworkProtocol

Dim valueNetworkProtocol

Dim keyUserName

Dim valueUserName

Dim FMversion

'

' Initialize Objects

'-----------------------

Set wshshell = CreateObject("WScript.shell")

Set oNetwork = WScript.CreateObject("WScript.Network")

'

' Initialize variables

'----------------------

FMversion = "6.0" ' change the version here to make this script work with other versions...

valueNetworkProtocol = "Fmtcp32.net"

valueUserName = oNetwork.UserName

Key = "HKEY_CURRENT_USERSoftwareFileMakerFileMaker Pro" & FMversion & "Preferences"

'

' Full syntax to Each preference

'--------------------------------

keyNetworkProtocol = Key & "Network Protocol"

keyUserName = Key & "User Name"

'

' write to the registry

'-----------------------

wshshell.RegWrite keyNetworkProtocol, valueNetworkProtocol, "REG_SZ"

wshshell.RegWrite keyUserName, valueUserName, "REG_SZ"

'

' release objects and quit this script

'--------------------------------------

Set wshshell = Nothing

Set oNetwork = Nothing

WScript.quit

'

' End of code

  • 1 month later...

You could use External Authentication. This requires a domain, I believe. When in use Get(accountName) returns the user's login name

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.